2016-12-06 100 views

回答

2

從父窗口 嘗試這個 在第一取回值將使用

If you open child using 
    popupWindow = window.open("my.html",'some name','width=500,height=500'); 

      In Child window: 


       //This gives DOM value of parent in child window. 
        window.opener.document.getElementById("your field name in parent window"); 



     //setting value 
     window.opener['dataitem'] = document.getElementById("your field name in child window").value; 

在父窗口:

    //This gives DOM value of child in parent window. 
       var some_data = window['dataitem']; 

希望這可以幫助你! 謝謝..

相關問題