我正在为 jQuery 中的点击事件使用 window.open
。
问题是我想禁用位置栏,它在 Safari 中有效,但在 Chrome 中无效。
我在某处听说无法摆脱 Chrome 中的地址栏,这是真的吗?
代码如下:
var features = "left=200,toolbar=0,resizable=0,scrollbars=0,location=0,menubar=0,status=0,width=510,height=547";
window.open(URL, NAME, features);
最佳答案
你不能在 chrome 中去掉它,但是 location=0
会让它至少不能被编辑。它仍然会出现,但他们无法更改位置。不过,除此之外,您无能为力。
关于javascript - 在谷歌浏览器中禁用位置栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13841839/