如何通过JavaScript隐藏状态栏和地址栏?我有以下代码:
var params = 'width=400, height=400';
params += ', top=0, left=0';
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=yes';
params += ', toolbar=no';
newwin = window.open('C:\Documents and Settings\Admin\Desktop\test.htm', 'windowname5', params);
在IE8中我们无法破解使用安全选项,那么我该如何实现呢?
答案 0 :(得分:2)
var params = 'width=400,height=400,top=0,left=0';
// you wanted to try to hide the status, then don't include it as =yes
// params += ',status=yes';
newwin = window.open('C:\Documents and Settings\Admin\Desktop\test.htm',
'windowname5', params);
应该与发布的代码相同,但如果允许则会隐藏状态
答案 1 :(得分:2)
要隐藏状态栏,请将status=yes
更改为status=no
。
出于安全原因,无法隐藏地址栏。