首页 > Web开发 > 详细

用js点击按钮把值先后提交到不同页面

时间:2014-02-08 15:42:52      阅读:370      评论:0      收藏:0      [点我收藏+]

  以前遇到过点击按钮把值提交到不同页面,我当时是用iframe做的,我当时把页面分成了左(上、下)、右三块,左下iframe 的name="framain",右边的iframe name="framap"。

bubuko.com,布布扣
<script type="text/javascript">
    function send_2page_f(formname, page1, target1, page2, target2) {
        with (eval("document." + formname)) {
            action = page1
            target = target1
            submit()
            action = page2
            target = target2
            submit()
        }
    } 
</script>

<form id="Form1" name="seachbusStation" method="post">
<div>

<input type="button"  onclick=send_2page_f("seachbusStation","yemian.aspx?screenwidth={screenwidth}&token={token","framain",
"yemian1.aspx?screenwidth={screenwidth}&token={token}&","framap")
/> </div> </form>
bubuko.com,布布扣

用js点击按钮把值先后提交到不同页面

原文:http://www.cnblogs.com/myj98/p/3540180.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!