asp 驗證用戶名是否包含有非常字符的函數(shù)
更新時間:2007年08月08日 12:09:32 作者:
<%
'******************************
'函數(shù):IsValidUserName(byVal UserName)
'參數(shù):UserName,用戶名稱
'作者:阿里西西
'日期:2007/7/15
'描述:驗證用戶名是否包含有非法字符,不含非法字符返回: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,用戶名稱
'作者:阿里西西
'日期:2007/7/15
'描述:驗證用戶名是否包含有非法字符,不含非法字符返回: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ù)的方法
在ASP中,如果你使用Set ors=oConn.Execute()來創(chuàng)建RecordSet對象,再使用RecordSet.RecordCount獲取記錄數(shù)時,你會發(fā)現(xiàn)它的值為-1,這時,我們可以使用GetRows方法來獲取記錄數(shù)。2010-12-12
用javascript解決外部數(shù)據(jù)抓取中的亂碼問題
用javascript解決外部數(shù)據(jù)抓取中的亂碼問題...2007-04-04

