<%
strng = "qwe$%sdf"
%>
<%
Function RegExpTest(patrn, strng)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "[a-zA-Z0-9]"
regEx.IgnoreCase = true
End Function
If regEx.Test(strng) Then
response.write("<script>alert('有非法字符!');location.href='11.asp';</script>")
Else
response.write("<script>alert('没有非法字符!');location.href='21.asp';</script>")
End If
%>
这段代码测试出现Microsoft VBScript ����ʱ���� ���� '800a01a8' 错误代码,请高手找一下错在什么地方了
<%
If Instr(request("username"),"=")>0 or
Instr(request("username"),"%")>0 or
Instr(request("username"),chr(32))>0 or
Instr(request("username"),"?")>0 or
Instr(request("username"),"&")>0 or
Instr(request("username"),";")>0 or
Instr(request("username"),",")>0 or
Instr(request("username"),"'")>0 or
Instr(request("username"),"?")>0 or
Instr(request("username"),chr(34))>0 or
Instr(request("username"),chr(9))>0 or
Instr(request("username")," ")>0 or
Instr(request("username"),"$")>0 or
Instr(request("username"),">")>0 or
Instr(request("username"),"<")>0 or
Instr(request("username"),"""")>0 then
response.write "朋友,你的提交用户名含有非法字符,请更改,谢谢合作 返回"
response.end
end if
%>请教高手这个测试为什么会出现Microsoft VBScript 编译器错误 错误 '800a0408'
无效字符