window.open 仅 IE 版本无法正常工作
window.open not working properly only IE versions
以下是我的代码。
function a(videoId){
var width = screen.width * 0.8;
var height = screen.height* 0.8;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
params = 'width='+width;
params += ', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
//params += ', resizable=no';
params += ', scrollbars=yes';
params += ', status=no';
params += ', toolbar=no';
params += ', fullscreen=yes';
var url ="/static/abc.html?videoId="+videoId;
var newwin=window.open(url,'Video Help', params);
if (window.focus) {newwin.focus()}
return false`
}
在所有其他浏览器中,新的 window 高度和宽度在 IE 中作为 expected.But 工作,它提供完整的 window 大小(像 f11 模式)我无法从那个新的回来window screen.Please 帮帮我。
来自MDN documentation on window.open()
:
fullscreen
Do not use. Not implemented in Mozilla. There are no plans to implement this feature in Mozilla.
This feature no longer works in MSIE 6 SP2 the way it worked in MSIE 5.x. The Windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in MSIE 5.x.
fullscreen
always upsets users with large monitor screen or with dual monitor screen. Forcing fullscreen
onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users.
Supported in:
fullscreen
does not really work in MSIE 6 SP2.
那里没问题。答案是不要使用全屏(特别是如果您不希望 window 全屏)。
以下是我的代码。
function a(videoId){
var width = screen.width * 0.8;
var height = screen.height* 0.8;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
params = 'width='+width;
params += ', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
//params += ', resizable=no';
params += ', scrollbars=yes';
params += ', status=no';
params += ', toolbar=no';
params += ', fullscreen=yes';
var url ="/static/abc.html?videoId="+videoId;
var newwin=window.open(url,'Video Help', params);
if (window.focus) {newwin.focus()}
return false`
}
在所有其他浏览器中,新的 window 高度和宽度在 IE 中作为 expected.But 工作,它提供完整的 window 大小(像 f11 模式)我无法从那个新的回来window screen.Please 帮帮我。
来自MDN documentation on window.open()
:
fullscreen Do not use. Not implemented in Mozilla. There are no plans to implement this feature in Mozilla. This feature no longer works in MSIE 6 SP2 the way it worked in MSIE 5.x. The Windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in MSIE 5.x. fullscreen
always upsets users with large monitor screen or with dual monitor screen. Forcingfullscreen
onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users.
Supported in: fullscreen
does not really work in MSIE 6 SP2.
那里没问题。答案是不要使用全屏(特别是如果您不希望 window 全屏)。