隐藏地址栏 [英] Hide Addressbar

查看:120
本文介绍了隐藏地址栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将隐藏地址栏从弹出窗口中打开并用window.open打开? 可以使用 location 选项可在大多数浏览器中打开/关闭地址栏:

  window.open ('popup.html','popup','location = no'); 

如果您正在瞄准视觉轻重量窗口,您可能还想禁用其他视觉元素例如工具栏 menubar 滚动条 status

  window.open('popup.html','popup', 
'location = no,toolbar = no,menubar = no,scrollbars = no,status = no');

浏览器可能会也可能不会选择遵循这些指令。查看 window.open()文档在Mozilla开发人员中心有关c $ c> function 的更多选项和有关各种浏览器支持的信息。


how to hide address bar from popup window opened with window.open?

解决方案

You can use the location option to toggle the address bar on/off in most browsers:

window.open('popup.html', 'popup', 'location=no');

If you are aiming for a "visually light weight window" you might also want to disable other visual elements such as toolbar, menubar, scrollbars, status:

window.open('popup.html', 'popup',
    'location=no,toolbar=no,menubar=no,scrollbars=no,status=no');

Browsers may or may not choose to follow these directives. See the comprehensive documentation of the window.open() function in Mozilla Developer Center for more options and information about support in various browsers.

这篇关于隐藏地址栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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