父窗口代码
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(); }