首页 > Windows开发 > 详细

解决window.open传值的问题

时间:2014-12-04 17:47:52      阅读:195      评论:0      收藏:0      [点我收藏+]

1.html

<script type="text/javascript">
        function showItem() {
        
             var  win = window.open("2.html",null," height=300,width=450,  Left=300px,Top=20px, menubar=no,titlebar=no,scrollbar=no,toolbar=no, status=no,location=no");
        
        }
    </script>
    
        <input type="button" id="txtId"/>
        <input type="button" id="txtName"/>
        <input type="button" id="btnShow" onclick="showItem();"  value="显示子窗体"/>

2.html

 <script language="javascript" type="text/javascript">
       function check() {
    
              window.opener.document.getElementById("txtId").value="ID";
              window.opener.document.getElementById("txtName").value="NAME";
      }
    </script>
    
    <input type="button" id="btnSelect" onclick="check()"  value="选择"/>    

 

解决window.open传值的问题

原文:http://www.cnblogs.com/321qwe/p/4143269.html

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