如何通过SUBMIT判断表单是否已经提交
思路是第一次访问时没有查询条件,就返回所有的纪录。如果提交了查询条件肯定要按SUBMIT。如何通过SUBMIT判断表单是否已经提交。谢谢
[解决办法]
<form name = "form1 " action= " " method = "post ">
<table>
<tr>
<td> 查询条件 </td>
<td> <input type =text name = "xxx " value = " "> </td>
<td> <input type =submit name =submit onclick = submitform()> </td>
</tr>
</table>
</form>
<SCRIPT language=javascript type= "text/javascript ">
function submitform()
{
var sql = document.all.xxx.value;
if(! " ".equals(sql) && sql <> null){
document.all.submit();
}
}
</SCRIPT>