请帮我看看执行这个ASP为什么出错??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@LANGUAGE = "VBScript"%>
<%
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
%>
<HTML>
<HEAD>
<TITLE>checkemail </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<form name="form1" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<table>
<tr>
<td>email</td>
<td><input type="text" name="email"></td>
<td><input type="button" name="b1" value="submit" onclick="return checkemail(email.value)"></td>
</tr>
</table>
</BODY>
</HTML>
运行的时候,老提示错误类型:
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/cerc/web/board/Noname1.asp, line 11
IsValidEmail = false