window.open如何返回值给父窗口

父窗口代码

1  function showMyWindowNew() {
2             var iTop = (window.screen.availHeight - 30 - 450) / 2;
3             //获得窗口的水平位置 
4             var iLeft = (window.screen.availWidth - 10 - 800) / 2;
5             window.open("/A_SheepXJHSK/IndexSef", '', "height=450px,width=800px" + "top=" + iTop + ",left=" + iLeft );
6         }

子窗口返回代码

 if (window.opener) {
                                var fWindowText1 = window.opener.document.getElementById("shed_id");
                                fWindowText1.value = rows.Chipid;
                                window.close();
                            }

 

posted @ 2017-02-06 15:33  EasyCms-  阅读(7393)  评论(0编辑  收藏  举报