关于密码判断的小问题,大家看看哪个地方有错误
在输入密码时,“密码”和“确认密码”不管相不相同,都提示“考生的密码两次输入不一致!”,大家看一下是哪个地方的毛病,代码如下:
<!--#include file= "NS_Conn.asp "-->
<!--#include file= "NS_Exam_checkuser.asp "-->
<!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>
<style type= "text/css ">
<!--
body {
background-color: #EFF8FE;
}
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<script language= "javascript ">
function checkform(myform)
{
if(myform.zkz.value== " ")
{
alert( "考生的准考证号不能为空! ");
myform.zkz.focus();
return false;
}
if(myform.psw.value== " ")
{
alert( "考生的密码不能为空! ");
myform.psw.focus();
return false;
}
if(myform.psw1.value== " ")
{
alert( "确认密码不能为空! ");
myform.psw1.focus();
return false;
}
if(myform.psw.value!=myform.psw1.value);
{
alert( "考生的密码两次输入不一致! "+myform.psw.value+ "\n "+myform.psw1.value);
myform.psw.focus();
return false;
}
if(myform.name.value== " ")
{
alert( "考生的真实姓名不能为空! ");
myform.name.focus();
return false;
}
}
</script>
</head>
<body>
<form action= "NS_Exam_kaosheng_add.asp " method= "post " name= "cnwy " id= "cnwy " onsubmit= "return checkform(this) ">
<table width= "347 " align= "center " cellpadding= "1 " cellspacing= "1 " bgcolor= "#67B0ED ">
<tr>
<td colspan= "2 " bgcolor= "#EFF8FE "> <div align= "center "> 考生增加 </div> </td>
</tr>
<tr>
<td width= "116 " bgcolor= "#EFF8FE "> 考生的准考证号: </td>
<td width= "222 " bgcolor= "#EFF8FE "> <input name= "zkz " type= "text " id= "zkz " size= "16 "> </td>
</tr>
<tr>
<td bgcolor= "#EFF8FE "> 考生登陆的密码: </td>
<td bgcolor= "#EFF8FE "> <input name= "psw " type= "password &quo