首页 新闻 会员 周边

同一个table的两个不同的form

0
[已解决问题] 解决于 2011-02-14 01:13

有两个form的提交地址是不同,但form里面的html代码是一样,我想节省代码,如何做到两个按钮是分开提交的

NCCC的主页 NCCC | 初学一级 | 园豆:22
提问于:2011-02-11 15:25
< >
分享
最佳答案
0

<form action="a.asp" method="post" id="form1">
<input type="text" name="world" value="hello" />
<input type="submit" value="submit" />
<input type="button" value="sumbit2" onclick="document.getElementById('form1').action='b.asp';document.getElementById('form1').submit();" />
</form>

 

I,Robot | 大侠五级 |园豆:9783 | 2011-02-11 21:54
其他回答(1)
0

那就分开写两个按钮的点击事件了。。。改变form的action

顾晓北 | 园豆:10844 (专家六级) | 2011-02-11 17:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册