if (document.form1.password.length == 0 )
{
alert("请输入密码!");
document.form1.password.focus();
return false;
}
if (document.form1.password1.length == 0 )
{
alert("请输入确认密码!");
document.form.password1.focus();
return false;
}
if (document.form1.password.value!=document.form1.password1.value)
{
alert("两次输入的密码不一致!请重新输入");
document.form1.password.focus();
return false;
}
return true;
}
</script>
<form name="form1" id="form1" method="POST" action="" onsubmit="return submit_onclick();">
<input type="text" name="user" value="">
<input type="submit" value="提交" name="B1">
</form>