我们有时在制作网页过程中,可能需要实现在一个表单中提交多个按钮,来实现一个表单提交到多个处理页面,进行 不同的处理。具体请看下面的代码。
<script type="text/javacript" language="html" title=javascript>javascript">
html" title=function>function Button1(){
document.formName.html" title=action>action="1.htm";
formName.submit();
}
html" title=function>function Button2(){
document.formName.html" title=action>action="2.htm";
formName.submit();
}
</script>
<html>
<body>
<form name="formName" html" title=action>action="#">
<html" title=input>input name="html" title=button>button1" id="html" title=button>button1" value="按钮1" οnclick="Button1()"/>
<html" title=input>input name="html" title=button>button2" id="html" title=button>button2" value="按钮2" οnclick="Button2()"/>
</form>
</body>
</html>