<%
username=trim(request.form("username"))
password=trim(request.form("password"))
if username="" or password="" then
response.write "<script>alert('输入密码和姓名');window.location='login.asp'</script>"
end if
if trim(username)="admin" and trim(password)="admin" then
session("loginid")="pass"
response.redirect "add.asp"
else
session("error")="密码输入错误"
response.redirect "login.asp"
end if
%>
我主要是想验证个表单,但是上面的javascript好象不好用,如果我单独屏蔽下面的
if trim(username)="admin" and trim(password)="admin" then
session("loginid")="pass"
response.redirect "add.asp"
else
session("error")="密码输入错误"
response.redirect "login.asp"
end if
它又好用,不明白!