<form action=about:ok>
<input type="button" onclick=if(check())submit() value=button>
</form>
<script>
function check(){
return true;
}
</script>
<input type="button" onclick=if(check())submit() value=button>
</form>
<script>
function check(){
return true;
}
</script>
function checkform()
{
if(form1.text1.value=="")
{
alert("不能提交");
}else{
form1.submit();
}
}
</script>
<form name=form1>
<input type=text name=text1 value="">
<input type=button onclick="checkform();" value="提交?">
</form>
<form onSubmit="return checkForm()">