JavaScriptÑéÖ¤³ö´í - .NET¼¼Êõ / ASP.NET
HTML code:
<asp:TextBox ID="Name" runat="server" onblur="checkName()">2</asp:TextBox><asp:Label runat="server" ID="NameCheck"></asp:Label>
JScript code:
function checkName()
{
var lreg=/^\S{4,12}/;
var sreg=/^\w+$/;
var n=document.getElementById("<%=Name.ClientID %>");
var nc=document.getElementById("<%=NameCheck.ClientID %>");
var name=n.value;
if(name==null||name.length==0)
{
nc.innerHTML="Óû§Ãû²»ÄÜΪ¿Õ";
return false;
}
else if((!lreg.exec(name))||(!sreg(name)))
{
nc.innerHTML="³¤¶ÈΪ4¡«12¸öÖÐÓ¢ÎÄ×Ö·û£¬Êý×Ö£¬Ï»®Ïß";
return false;
}
else
{alert("Ñé֤ͨ¹ý£¡");
nc.innerHTML="";
return true;
}
}
ÕâÊÇÒ»¸ö»ù±¾µÄÑéÖ¤£¬onblur .ÎÊÌâÊÇÕâÑùµÄ·Ç¿ÕÑé֤ûÓÐ
Ïà¹ØÎÊ´ð£º
asp.netÅúÁ¿ÉÏ´«Í¼Æ¬×îºÃÓÐÔ´Â룬ÔÚÏߵȣ¡£¡£¡£¡£¡£¡£¡
Ô´ÂëºÜ³¤µÄ¡£
²Î¿¼
C# code:
HttpFileCollection files = HttpContext.Current.Request.Files;
if (files.Count <= 1)
{
......
¸÷λ´óÏÀ£¬ÎÒѧϰµÄÊÇASP.NET£¬ÏëÖªµÀÏà¹Ø¼¼ÊõÓÐÄÄЩ£¬¾ÍÏñJAVA EEÖÐÓÐstruct sping jsp severlet µÈ£¬ASP.NET»¹ÓÐÄÄЩЩÏà¹Ø¼¼Êõ¡£
http://topic.csdn.net/u/20090914/21/af27de99-f0f3-4cfd-9379-13764f8ec6b1.ht ......
C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.InteropServices;
nam ......
ÎÒ×î½ü×öÁËÒ»¸öÍøÕ¾ÊǹØÓÚ²úƷչʾµÄ ~ Õû¸öÍøվͼƬ¶¼Õ¼ÓÃÁËÒ»´ó°ë
ÕâÑùµÄ»°·ÃÎÊËٶȾͷdz£Âý ÓÐʲô°ì·¨¿ÉÒÔ½â¾öÂð£¿
Âé·³´ó¼Ò¶à¶à¸øµãÒâ¼û £¡ ÓÐʲô¾¡¹Ü˵
3Q´ó¼Ò
htmlÒ³Ãæ.
Õâ¸ö,¼ÈÈ»Ö÷Ò ......