在同一个form里面两个按钮 如何提交到不同的action. 前提是用Js解决、

如题目!、在线等,

<script language="JavaScript" type="text/javascript">\
js1方法(){document.all.form1.action="searchuser.action";
document.all.form1.submit();}
js2方法(){document.all.form1.action="findchuser.action";
document.all.form1.submit();} //form1为表单name
</script>
<input type="button" value="***" onclick="js1方法"/>
<input type="button" value="***" onclick="js2方法"/>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-08-03
<form name="form1" id="form1" action="" method="post">
<input type="button" value="action1" onclick="document.form1.action='action1';document.form1.submit();" />
<input type="button" value="action2" onclick="document.form1.action='action2';document.form1.submit();" />
</form>