asp登陆界面如何在点击submit时验证密码?

来源:百度知道 编辑:UC知道 时间:2024/09/28 13:46:43
asp用户登陆界面,如何在点击submit时验证密码?当密码错误定位到一个错误提示页面,或者直接在该页面给出提示。
好像onClick可以调用一个子程序,但是不知道怎么写??
哪位大虾指点一下

在接收密码验证的那个文件里写,比如:

if rs.eof then
Response.Write ("<script>alert(' 会员登陆失败!\n\n 用户名不存在!');history.back();</script>")
Response.end
else
if rs("password")<>UserPass then
Response.Write ("<script>alert(' 会员登陆失败!\n\n 密码输入错误!');history.back();</script>")
Response.end
else
rs("loginIP")=userip
rs("logintime")=Now()
rs.update
Response.Cookies("UserName")=UserName
end if
end if

或者用 JS 直接检测