换个思路,打开一个,关闭一个,打开的时候重新定义即可

解决方案 »

  1.   

    算了,我这已经是“打开一个,关闭一个”了,就是为了屏蔽工具栏才打开了这个,关闭了原来那个的。
      

  2.   

    IE浏览器不能实现这个(动态控制工具栏的显示状态)功能,Navigator 4.0支持。
    下面的信息是我在一个javaScript语言参考手册中看到的:属性:menubarRepresents the browser window's menu bar. This region contains browser's drop-down menus such as File, Edit, View, Go, Communicator, and so on. 
    属性源  Window  
    实现版本  Navigator 4.0  描述
    The value of the menubar property itself one property, visible. If true, the menu bar is visible; if false, it is hidden. 安全性
    Setting the value of the menu bar's visible property requires the UniversalBrowserWrite privilege. 要获取 Navigator 4.0 中关于安全性更多的信息,请看“JavaScript 指南”中的第七章“JavaScript 安全性”。 示例
    The following example would make the referenced window "chromeless" (chromeless windows lack toolbars, scrollbars, status areas, and so on, much like a dialog box) by hiding most of the user interface toolbars: 
    self.menubar.visible=false;
    self.toolbar.visible=false;
    self.locationbar.visible=false;
    self.personalbar.visible=false;
    self.scrollbars.visible=false;
    self.statusbar.visible=false;