[問題] 一次送出兩份表單?
我頁面裡有兩份form、一個button,想要按下button的同時,利用javascript將兩份
表單內容送出去
<form name="form1">...</form>
<form name="form2">...</form>
<input type="button" onClick="javascript:SendForm();">
function SendForm()
{
document.form1.method="post";
document.form1.action="list.php";
document.form1.submit();
document.form2.method="post";
document.form2.action="list.php";
document.form2.submit();
}
可是這樣子,只有其中一個form的內容能夠被$_POST[]接收到
像是在FF3,就是下面的form2內容可以用$_POST[]取得;在chrome的話,變成是form1
內容可被取得.....(IE還沒試過)
如果上下位置調換(js內的程式碼),就會換成另一個form可被取得 XD
想請問是我程式寫錯了,還是POST本身有限制呢?
麻煩各位指點一下,謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.38.6.81
→
01/25 14:23, , 1F
01/25 14:23, 1F
→
01/25 14:24, , 2F
01/25 14:24, 2F
→
01/25 14:24, , 3F
01/25 14:24, 3F
→
01/25 14:26, , 4F
01/25 14:26, 4F
→
01/25 14:44, , 5F
01/25 14:44, 5F
→
01/25 22:57, , 6F
01/25 22:57, 6F
→
01/26 11:42, , 7F
01/26 11:42, 7F
→
01/26 11:42, , 8F
01/26 11:42, 8F
→
01/26 11:43, , 9F
01/26 11:43, 9F
→
01/26 13:44, , 10F
01/26 13:44, 10F
→
01/26 13:51, , 11F
01/26 13:51, 11F
→
01/26 14:00, , 12F
01/26 14:00, 12F