<script type="text/javascript">
function check() {
var pwd = $("#pwd").val();
if(pwd == ""){
alert("密码不能为空");
return false;
}
if(pwd.length < 6){
alert("密码必须等于或大于6个字符");
return false;
}
var repwd = $("#repwd").val();
if(pwd!=repwd){
alert("两次输入的密码不一致");
alert(repwd);
return false;
}
[code=javascript]
[/code]
return true;
}
$(function(){
$("#myform").submit(function(){
return check();
});
});
</script>
<form action="success.html" method="post" id="myform" name="myform">
<tr>
<td>
您的Email:<input id="email" type="text" class="inputs" />
</td>
</tr>
<tr>
<td>
输入密码:<input id="pwd" type="password" class="inputs" />
</td>
</tr>
<tr>
<td>
确认密码:<input id="#repwd" type="password" class="inputs" />
</td>
</tr>
<tr>
<td>
您的姓名:<input id="user" type="text" class="inputs" />
</td>
</tr>
每到两次输入的密码不一致那个地方就通不过了,明明是一样的啊,ID也写错,检查几百次了。。。求助大神看看是什么情况
alert(repwd);显示是空值