asp 驗(yàn)證用戶名是否包含有非常字符的函數(shù)
更新時(shí)間:2007年08月08日 12:09:32 作者:
<%
'******************************
'函數(shù):IsValidUserName(byVal UserName)
'參數(shù):UserName,用戶名稱(chēng)
'作者:阿里西西
'日期:2007/7/15
'描述:驗(yàn)證用戶名是否包含有非法字符,不含非法字符返回:true
'示例:IsValidUserName(byVal UserName)
'******************************
Function IsValidUserName(byVal UserName)
Dim i,c
IsValidUserName = True
For i = 1 To Len(UserName)
c = Lcase(Mid(UserName, i, 1))
If InStr("$!<>?#^%@~`&*();:+='"" ", c) > 0 Then
IsValidUserName = False
Exit Function
End IF
Next
End Function
%>
'******************************
'函數(shù):IsValidUserName(byVal UserName)
'參數(shù):UserName,用戶名稱(chēng)
'作者:阿里西西
'日期:2007/7/15
'描述:驗(yàn)證用戶名是否包含有非法字符,不含非法字符返回:true
'示例:IsValidUserName(byVal UserName)
'******************************
Function IsValidUserName(byVal UserName)
Dim i,c
IsValidUserName = True
For i = 1 To Len(UserName)
c = Lcase(Mid(UserName, i, 1))
If InStr("$!<>?#^%@~`&*();:+='"" ", c) > 0 Then
IsValidUserName = False
Exit Function
End IF
Next
End Function
%>
相關(guān)文章
ASP中使用Set ors=oConn.Execute()時(shí)獲取記錄數(shù)的方法
在ASP中,如果你使用Set ors=oConn.Execute()來(lái)創(chuàng)建RecordSet對(duì)象,再使用RecordSet.RecordCount獲取記錄數(shù)時(shí),你會(huì)發(fā)現(xiàn)它的值為-1,這時(shí),我們可以使用GetRows方法來(lái)獲取記錄數(shù)。2010-12-12用javascript解決外部數(shù)據(jù)抓取中的亂碼問(wèn)題
用javascript解決外部數(shù)據(jù)抓取中的亂碼問(wèn)題...2007-04-04asp在iis7報(bào)錯(cuò)行號(hào)不準(zhǔn)問(wèn)題的解決方法
這篇文章主要介紹了asp在iis7報(bào)錯(cuò)行號(hào)不準(zhǔn)問(wèn)題的解決方法,需要的朋友可以參考下2020-08-08