标签:
<script language="JavaScript" type="text/javascript">
function windowsSubmit(actionType) { if (actionType=="search"){ document.forms[0].action="P_Search.action"; } else if (actionType=="clear"){ document.forms[0].action="P_Clear.action"; } else if (actionType=="excel"){ document.forms[0].action="P_Excel.action"; } if (checkOnceTime()){ document.forms[0].submit(); } else { //alert("bbbbbb"); } } var mMOnceTimeFlg = true; //防止页面重复提交 function checkOnceTime(){ if (mMOnceTimeFlg == true) { mMOnceTimeFlg = false; //alert("true"); return true; } //alert("false"); return false; }
</script>
<form method="POST" > <table> <tr> <td> <img src="img/search.gif" onClick="windowsSubmit(‘search‘)" alt="检索"/> <img src="img/clear.gif" onClick="windowsSubmit(‘clear‘)" alt="清除"/> <img src="img/FileOut.gif" onClick="windowsSubmit(‘excel‘)" alt="文件出力 "/> </td> </tr> </table> </form>
from表单多个按钮提交用onclick跳转不同action
标签:
原文地址:http://www.cnblogs.com/gaozh205/p/4393185.html