这段验证错在哪了啊?为什么不起作用~~~
<form name="myform" method="post" action="add_save.asp" onsubmit="return checkform()">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="3">
<tr>
<td width="88">标题</td>
<td colspan="2"><input name="laws_head" type="text" id="laws_head" size="60" /></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td valign="top">内容</td>
<td colspan="2"><textarea name="laws_body" cols="60" rows="30" id="laws_body"></textarea></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td width="228"><input type="submit" name="Submit" value="提交" /></td>
<td width="284"><input type="reset" name="Submit2" value="重置" /></td>
</tr>
<input type="hidden" name="x" value="3">
</table>
</form>
<script language="javascript">
function Checkform()
{If(document.MyForm.laws_head.value=="")
{alert("请输入标题!");
return false;}
If (document.MyForm.laws_body.value=="")
{alert("请输入内容!");
return false;}
else
return true;
}
</script>