Javascript 使用Javascript从弹出窗口中删除地址栏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10968763/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove Address bar from popup window using Javascript
提问by Yasser-Farag
Is it applicable to remove the address bar from a popup window using javascript ex:
是否适用于使用 javascript ex 从弹出窗口中删除地址栏:
window.open(url, 'liveMatches', 'width=720,height=800,toolbar=0,location=0, directories=0, status=0, menubar=0');
please advice,
请指教,
采纳答案by Anthony Grist
Theoretically, yes. However, as with everything in Javascript, there's no guarantee that any given browser will support it or that the implementation will be consistent across browsers.
理论上,是的。但是,与 Javascript 中的所有内容一样,不能保证任何给定的浏览器都支持它或实现在浏览器之间保持一致。
This linkas well as this linkindicate that the location
option should control whether or not the Location/Address bar is shown. It should also have relatively good cross-browser support.
回答by Raab
use jquery ui (http://jqueryui.com/demos/dialog/)
使用 jquery ui ( http://jqueryui.com/demos/dialog/)
or perhaps
也许
window.open(url,'liveMatches','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=720,height=800');
actually
实际上
You cannot remove the address bar in modern browsers. That is a security measure. The user must always know what page they are on. Address bar also let user know, what type of security is on that page (HTTP or HTTPS).
您无法删除现代浏览器中的地址栏。那是一种安全措施。用户必须始终知道他们在哪个页面上。地址栏还让用户知道该页面上的安全类型是什么(HTTP 或 HTTPS)。