2012-05-16 85 views

回答

0

它應該是這樣的:

window.opener.document.getElementById('label1').value = "the new value"; 
0
<script> 
function myFunction() { 
    var additionalWindow = window.open("/additional"); 

    // Write on the additional window 
    additionalWindow.document.write('written from separate window'); 

    // Call a function on the additional window 
    additionalWindow.someFunction(); 
} 
</script> 

Here's Mozilla's documentation on window.open().

相關問題