表单验证问题 帮忙看下 我觉没什么问题?在线等
提交的时候老不验证 到底怎么回事 谢谢!
<html>
<head>
<title>ddfd</title>
</head>
<script language="javascript">
<!--
function Check()
{
if (document.formq.hello1.value=="")
{
alert("dddd");
document.form1.hello1.focus();
return false;
}
if (document.formq.hello2.value=="")
{ alert("dddd1");
document.form1.hello2.focus();
return false;
}
if (document.formq.hello3.value=="")
{ alert("dddd2");
document.form1.hello3.focus();
return false;
}
return true;
}
-->
</script>
<body>
<form name="formq" action="" method=post onsubmit="return check(this)">
<input type="text" name="hello1">
<input type="text" name="hello2">
<input type="text" name="hello3">
<input type="submit" name="submit" value="tijiao" >
<input type="reset" name="hel" value="chongzhi">
</form>
</body>
</html>