toolbar.visible无法运行 [英] toolbar.visible does not operate

查看:98
本文介绍了toolbar.visible无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我需要从当前窗口中删除工具栏和菜单栏(未打开

with window.open,这太简单!!!)。

我试过使用window.toolbar.visible = false属性,

但它没有效果。

没有错误信息在javascript控制台中,对

当前窗口没有任何影响。

我已经尝试过Firefox和IE,效果相同....

我该怎么办

Hello,
I need to remove toolbar and menubar from my current window (not opened
with window.open, it would be too easy!!!).
I''ve tried to use the window.toolbar.visible=false property,
but it has no effect.
No error message in the javascript console, nor any effect on the
current window.
I''ve tried Firefox and IE, same effect....
What should I do

推荐答案

DEN写道:
我试图使用window.toolbar。 visible = false属性,
但它没有效果。
I''ve tried to use the window.toolbar.visible=false property,
but it has no effect.




IIRC这个功能从Mozilla中删除后,您无法再更改

可见性属性。 window.toolbar从来都不是一个可编写脚本的IE

元素。


Daniel



IIRC This "feature" was removed from Mozilla, you cannot change the
visibility property anymore. window.toolbar was never a scriptable IE
element.

Daniel





DEN写道:



DEN wrote:

我需要从当前窗口中删除工具栏和菜单栏(不用window.open打开
,这太简单!!!)。
我试过使用window.toolbar.visible = false属性,
但它没有效果。
没有错误信息javascript控制台,对
当前窗口没有任何影响。
我已经尝试过Firefox和IE,效果相同....
I need to remove toolbar and menubar from my current window (not opened
with window.open, it would be too easy!!!).
I''ve tried to use the window.toolbar.visible=false property,
but it has no effect.
No error message in the javascript console, nor any effect on the
current window.
I''ve tried Firefox and IE, same effect....




使用IE,你应该得到一个脚本错误,因为window.toolbar是未定义的。对于Firefox,只有特权脚本允许执行此类更改,因此您需要签署脚本,然后要求获得特权,例如


netscape.security.PrivilegeManager.enablePrivilege(''UniversalBrowserWrite'');

window.toolbar.visible = false;


-


Martin Honnen
http:// JavaScript .FAQTs.com /


Martin Honnenaécrit:
Martin Honnen a écrit :


DEN写道:



DEN wrote:

我需要从当前窗口中删除工具栏和菜单栏(不是用window.open打开,这太简单!!!)。
我试图使用window.toolbar.visible = false属性,
但它没有效果。
在javascript控制台中没有错误信息,也没有对
当前有任何影响窗口。
我已经尝试过Firefox和IE,同样的效果ect ....
I need to remove toolbar and menubar from my current window (not
opened with window.open, it would be too easy!!!).
I''ve tried to use the window.toolbar.visible=false property,
but it has no effect.
No error message in the javascript console, nor any effect on the
current window.
I''ve tried Firefox and IE, same effect....



使用IE,你应该得到一个脚本错误,因为window.toolbar是未定义的。对于Firefox,只有特权脚本才允许执行此类更改,因此您需要签署脚本然后请求权限,例如

netscape.security.PrivilegeManager.enablePrivilege (''UniversalBrowserWrite'');

window.toolbar.visible = false;


With IE you should get a script error as window.toolbar is undefined. As
for Firefox only privileged script is allow to perform such changes so
you would need to sign your script and then ask for the privilege e.g.

netscape.security.PrivilegeManager.enablePrivilege (''UniversalBrowserWrite'');

window.toolbar.visible = false;



感谢您的回答,

但因为IE是最常用的,

有人知道为任何浏览器做这件事吗?

再次感谢

DEN


Thanks for this answer,
but as IE is the most used,
does someone know the way to do it for any browser ?
Thanks again
DEN


这篇关于toolbar.visible无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆