asp弹出对话框

来源:百度知道 编辑:UC知道 时间:2024/05/25 11:05:29
在一个页面上执行的时候弹出对话框让他输入密码!接下验证他输入的密码输入正确,如果正确的话执行下面的语句,不正确的话提示密码错误,并返回到上一页~!~怎么做啊~!~

这个是验证表单

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="javascript">
function $form(){
if (document.form1.password.value.length<6){
alert("密码至少6位!");
return false;
}
if (document.form1.re_password.value != document.form1.password.value){
alert("两次密码输入不一致!");
return false;
}
return true;
}
</script>

<body>
<form name="form1" method="post" action="" onSubmit="return $form();"><