[英]IE9 weird javascript issue
In IE9 Beta, i am not able to access javascript variables in a child window from the parent window. 在IE9 Beta中,我无法从父窗口访问子窗口中的javascript变量。
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 popup.jsp包含这样的脚本
var foo = 'bar';
The condition inside the if block is truthy in every other browser except IE9. if块中的条件在除IE9之外的所有其他浏览器中都是正确的。 In IE9 mywin.foo is undefined . 在IE9中, mywin.foo是undefined 。
Can someone shed some light on this? 有人可以阐明这一点吗?
This issue was fixed in IE9 RC1. 此问题已在IE9 RC1中修复。 Seems to be an IE bug. 似乎是IE错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.