一体化超声波液位计:求教ASP高手

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 20:17:05
我还有个问题,就是当我点击了“我要登陆”按牛后,如果没有输入帐号和密码,我想让他弹出对话框提示一下,然后再跳转到登陆页面,我写的代码是:
<form name="form1" method="post" action="2.asp?action=add">
<input name="submit" type="submit" value="我要登陆">
<input name="reset" type="reset" value="放弃登陆">
<%
if request.form("action")="add" then
username=Request.Form("username")
userpsw=Request.Form("userpsw")
action="true"
if request.form("username")="" then
response.write "<script>alert('请输入您完整的成员信息');location.href='http://localhost/baby/1.asp';</script>"
action="false"
end if
if title="" then
response.write "<script>alert('请输入您完整的成员信息');location.href='http://localhost/baby/1.asp';</script>"
action="false"
end if
end if
%>