表单提交,处理值
<form name="form1" method="post" action="">
<input name="a1" type="text" onchange="checkValue()">
<input name="a2" type="text" onchange="checkValue()">
<input name="a3" type="text">
</form1>
<script >
function checkValue()
{
if (document.form1.a1.value>=4 || document.form1.a2.value>=4 )
document.form1.a3.value=4;
return;
else
document.form1.a3.value =0;
}
</script>
我想要的功能是,如果A1大于4 或是A2大于4 则A3等于4。
再有,我再处理前首先要处理一下是不是数值