隐藏地址栏 [英] Hide Addressbar
问题描述
如何将隐藏地址栏从弹出窗口中打开并用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屋!