简体   繁体   中英

IE9 weird javascript issue

In IE9 Beta, i am not able to access javascript variables in a child window from the parent window.

var mywin = window.open('popup.jsp', 'popup', 'width=400,height=200,scrollbars=yes');

if(mywin.foo == 'bar') {
   // do something
}

popup.jsp contains a script like this

var foo = 'bar';

The condition inside the if block is truthy in every other browser except IE9. In IE9 mywin.foo is undefined .

Can someone shed some light on this?

This issue was fixed in IE9 RC1. Seems to be an IE bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM