怎么调用function 函数
怎么实现下面功能啊a.asp页面
<html>
<body>
<form action="page.asp" method="post" name="form1">
<input name="UserName" type="text">
<input name="submit" type="button" value="检查用户">
<input name="submit" type="submit" value="提交">
</form>
</body>
</html>
当我点击 检查用户时,会弹出一个页面如果用户名合法则提示成功,如果用户名含有非法字符则提示他用户名含有非法字符
检查用户是否非法,问一下怎么调用function函数(调用下面类里的function函数)
Class Che_class
public Function IsValidUserName(byVal UserName)
on error resume next
Dim i,c
Dim VUserName
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
For Each VUserName in Register_UserName
If UserName = VUserName Then
IsValidUserName = False
Exit For
End If
Next
End Function
End Class