<html>
<head>
<title>New Page 1</title>
</head>
<script>
function check(){
if(parseFloat(document.all.a.value)<2||parseFloat(document.all.b.value)==0){
alert("error!")
event.returnValue = false;
}
else
event.returnValue = true
}
</script>
<body>
<form method="POST" action="" onsubmit="check()">
<p>值1:<input type="text" name="a"></p>
<p>值2:<input type="text" name="b"></p>
<p><input type="submit" value="&Igrave;á&frac12;&raquo;" name="B1"></p>
</form>
</body>
</html>