function check(form){
window.alert('step1');
if(form.pwd.value.length==0){
alert("您没有填写密码。");
return false;
}
window.alert('step2');
form.submit();
}看看有什么效果
window.alert('step1');
if(form.pwd.value.length==0){
alert("您没有填写密码。");
return false;
}
window.alert('step2');
form.submit();
}看看有什么效果
<!--
function check(Obj){
if(Obj.value.length==0){
alert("您没有填写密码。");
return false;
}
form.submit();
}
-->
</script>
<form action="order.php" method="POST" name="form">
<input type=password name=pwd>
<input type="button" name="submit" value="确认" onClick="check(form.pwd)"></form>