<BODY>
<form name=f method="GET">
<input name=q value=csdn>
</form>
<button onclick="test()">test</button>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test(){
with (document.f){
target="_blank";
action="http://www.csdn.net";
submit();
target="_self"
action="http://www.google.com/search";
submit();
}
}
//-->
</SCRIPT>
</BODY>
<BODY>
<form name=f method="GET">
<input name=q value=csdn>
</form>
<button onclick="test()">test</button>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test(){
with (document.f){
target="_blank";
action="http://www.csdn.net";
submit();
target="_self"
action="http://www.google.com/search";
submit();
}
}
//-->
</SCRIPT>
</BODY>
<form name=f method="GET">
<input name=q value=csdn>
</form>
<button onclick="test()">test</button>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test(){
with (document.f){
target="_blank";
action="http://www.csdn.net";
submit();
target="_self"
action="http://www.google.com/search";
submit();
}
}
//-->
</SCRIPT>
</BODY>
<BODY>
<form name=f method="GET">
<input name=q value=csdn>
</form>
<button onclick="test()">test</button>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test(){
with (document.f){
target="_blank";
action="http://www.csdn.net";
submit();
target="_self"
action="http://www.google.com/search";
submit();
}
}
//-->
</SCRIPT>
</BODY>
...
</form><script language=javascript>
function meizz()
{
var e = document.form1;
e.action = "a.asp";
e.target = "target1"; //指定target 值是防止都提交到一个网页里发生冲突
e.submit(); e.action = "b.asp";
e.target = "target2";
e.submit();
}
</script>
function actiontwo(oForm)
{
oForm.action = "1.asp";
oForm.target = "_blank";
oForm.submit();
oForm.action = "2.asp";
oForm.submit();
}
</script>
<form onsubmit="actiontwo(this)">
<iframe name="iframe1" width=0 height=0></iframe><!-- Òþ²ØÄÚǶ¿ò¼Ü -->
<form name=f method="GET">
<input name=q value=csdn>
</form>
<button onclick="test()">test</button>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test(){
with (document.f){
target="iframe1";
action="http://www.csdn.net";
submit();
target="_self"
action="http://www.google.com/search";
submit();
}
}
//-->
</SCRIPT>
</BODY>
...
</form><script language=javascript>
function meizz()
{
var e = document.form1;
e.action = "b.asp";
e.target = "iframe1"; //提交到隐藏的iframe里,用户是看不到的
e.submit(); e.action = "a.asp";
e.target = "_self"; //正规地提交,且结果显示在本页面里
e.submit();
}
</script>