日期:2014-05-17  浏览次数:21045 次

求助?asp中,怎么验证两个文本框中输入的密码是否一致?
如题~~~~~~~~~~~

------解决方案--------------------
这个是javascript代码
<form name= "form1 ">
<input type= "password " name= "pwd1 ">
<input type= "password " name= "pwd2 ">
<input type= "button " value= "提交 " onclick= "return check() ">
</form>

<script language= "javascript ">
function check()
{
var pwd1 = document.form1.pwd1.value;
var pwd2 = document.form2.pwd2.value;
if(pwd1==pwd2)
{
return true;
}
else
{
alert( "对不起,二次输入不一样! ");
return false;
}
}
</script>