当前位置:Gxlcms > JavaScript > 在一个form用一个SUBMIT(或button)分别提交到两个处理表单页面的代码

在一个form用一个SUBMIT(或button)分别提交到两个处理表单页面的代码

时间:2021-07-01 10:21:17 帮助过:10人阅读

代码如下:
<form onsubmit="aa(this);">
<input type="text" name="" value="test" /><input type="submit" value="提交" />
</form>
<iframe src="" name="fA" frameborder="1" scrolling="no"></iframe>
<iframe src="" name="fB" frameborder="1" scrolling="no"></iframe>
<script type="text/javascript">
function aa(oForm){
oForm.action="http://bbs.51js.com";
oForm.target="fA"
oForm.submit();
oForm.action="http://www.iecn.net/bbs/";
oForm.target="fB"
oForm.submit();
return false;
}
</script>

人气教程排行