[英]IE shows error: “Access is denied.” for resizeTo() function
var newHeight = $(window).height();
var newWidth = $(window).width();
if (newWidth < 633 )
{
/* newWidth < 650 ? window.innerWidth = 650 : $(window).height();
newHeight < 400 ? window.innerHeight = 400 : $(window).width(); */
window.resizeTo(670,newHeight+80);
}
else if (newHeight < 327) {
window.resizeTo(newWidth+18, 400)
}
So, here i dynamically assign height and width as window re-size, but in IE8 at Window.resizeTo(670,newHeight+80); 因此,在这里我动态地将高度和宽度指定为窗口的大小,但是在IE8中是Window.resizeTo(670,newHeight + 80); it shows "Access is denied."
它显示“访问被拒绝”。
it works fine for Window.resizeTo(670,400); 它适用于Window.resizeTo(670,400);
Any solution?? 任何解决方案? or otherOption of window.resizeTo() ??
或window.resizeTo()的otherOption? There no problem with FireFox and GoogleChrome.
FireFox和GoogleChrome没有问题。
Try this 尝试这个
var newHeight = $(window).height();
var newWidth = $(window).width();
if (newWidth < 633 ) {
newHeight+=80;
if (newHeight<100) newHeight=100;
window.resizeTo(670,newHeight);
alertSize();
}
else if (newHeight < 327) {
newWidth +=18;
if (newWith < 100) newWidth=100;
window.resizeTo(newWidth, 400)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.