ʹÓÃASPÑéÖ¤emailÓÊÏ䵨ַ
<%
'true=ÊÇÓʼþ;false=²»ÊÇ;
Function validate(ByVal str)
Dim temp,reg
Set reg = new regexp
reg.ignorecase=true
reg.global=true
reg.pattern = "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
validate = reg.test(Trim(str))
Set reg = Nothing
End Function
'********************************************
'º¯ÊýÃû£ºIsValidEmail
'×÷ Ó㺼ì²éEmailµØÖ·ºÏ·¨ÐÔ
'²Î Êý£ºemail ----Òª¼ì²éµÄEmailµØÖ·
'·µ»ØÖµ£ºTrue ----EmailµØÖ·ºÏ·¨
' False ----EmailµØÖ·²»ºÏ·¨
'********************************************
function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
response.write validate("abcd@d.com")&"<br>"
response.write IsValidEmail("abcd@dd.com")&"<br>"
%>
Ïà¹ØÎĵµ£º
1.ÔÚÎҵĵçÄÔÓÒ¼üµÄ”¹ÜÀí“ÖÐÕÒµ½“±¾µØÓû§ºÍ×锣¬È»ºóµ¥»÷”Óû§“£¬ÔÚÓұ߻ῴµ½Ò»¸ö½Ð"IWAM_20020101-0024"µÄÓû§£¬ÕâÊÇiiis°²×°Ê±×Ô¼º´´½¨µÄÄÚÖÃÕË»§£¬µãÓÒ¼ü“ÉèÖÃÃÜÂ딣¬µã¼ÌÐø£¬È»ºóÊäÈë“ÐÂÃÜÂ딺͓ȷÈÏÃÜÂ딡£“IWAM_20020101-0024&rdqu ......
dim arr(36),xx,tt,tmp
for xx=1 to 36
arr(xx-1)=xx
next
for xx=1 to 5
Randomize
tt=clng((ubound(arr)-xx)*rnd())
response.write(arr(tt) & "<br>")
tmp=arr(tt)
arr(tt)=arr(ubound(arr)-xx)
arr(ubou ......
ajax+asp.net+mssqlʵÏÖµÄajaxÎÞË¢ÐÂÁÄÌìÊÒ£¬Ö§³Öhtml web±à¼Æ÷¡£
ΪÁ˼ӿìËÙ¶È£¬Ê¹ÓÃÁË´æ´¢¹ý³Ì¡£
asp¼°php°æ±¾Çë¿´ÏÂÃæµÄÎÄÕÂ
ajax+asp+mssqlÎÞË¢ÐÂÁÄÌìÊÒ
ajax+php+mssqlÎÞË¢ÐÂÁÄÌìÊÒ
´ËÀý×ÓÒ²¿ÉÒÔ×÷Ϊmssql´æ´¢¹ý³ÌʹÓõÄʾÀý£¬Èçphpµ÷ÓÃmssqlµÄ´æ´¢¹ý³Ì£¬php»ñÈ¡mssqlÊý¾Ý¿âµÄÊä³ö²ÎÊý¡£
ҪʹÓò»Í¬µÄ¶¯Ì¬Ò³Ãæ£ ......
<% dim xml,root,allitem,nodecount
set xml=server.CreateObject("MicroSoft.XMLDom")
xml.load(server.mappath("style.xml"))
if xml.parseError.errorCode <> 0 then ......
ÔÚ ASP ÖУ¬ÓÐÁ½¸öºÜ³£Óõļ¯ºÏ£¬Ò»¸öÊÇ Request.QueryString£¬ÁíÒ»¸öÊÇ Request.Form¡£ÕâÁ½¸ö¼¯ºÏ¿ÉÒÔ»ñÈ¡ HTML ±íµ¥(HTML Forms) Ìá½»µÄÐÅÏ¢¡£
ÓÐ¹Ø HTML ±íµ¥£¬Çë²Î¼û HTML ½Ì³ÌÖÐµÄ HTML±íµ¥ Ò»Õ¡£
Request.QueryString
HTML ±íµ¥ÖÐµÄ method ÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇ get£¬ÁíÍâÒ»ÖÖÊÇ post¡£µ± HTML ±íµ¥µÄ metho ......