当我在window.open中设置位置no时,地址栏的详细信息不会被隐藏

Address bar details isn't hidden when i set location no in the window.open

本文关键字:地址栏 详细信息 隐藏 no window open 位置 设置      更新时间:2023-09-26

在我的应用程序中,我想显示网页与地址栏的详细信息应该隐藏。因此,我尝试了下面的代码并设置location=no。

var strStyle  = 'status=yes,menubar=no,location=no,toolbar=no,scrollbars=no,height='+strHeight+'px,width='+strWidth+'px,left='+strLeft+'px,top='+strTop+'px';
var newWindow = window.open(strFileName, strLaunchLocation, strStyle);  

不幸的是,它不能隐藏地址栏,这是可见的每个人。如何解决这个问题?

现代浏览器不再隐藏地址栏。

为窗口添加location=no。打开只会使地址栏只读。