如何隐藏地址栏在最新版本(Firefox, chrome和internet explorer)使用javascript窗

How to hide address bar in lastest version of (Firefox, chrome and internet Explour) using javascript window.open

本文关键字:chrome internet explorer 使用 javascript 新版本 隐藏 何隐藏 地址栏 最新版 Firefox      更新时间:2023-09-26

如何在最新版本(Firefox, chrome和internet Explorer)中隐藏地址栏

我正在使用下面的代码,但它不工作。

var popup = window.open('@Url.Action("LoanTaggingErrorReport","Finance")',
'name','width=900,height=750,
toolbar=no,scrollbars=no,location=no,resizable =yes');

我在网上看了几个解决方案,但似乎没有一个可以让IE和Firefox一起工作。然后我想出了一个办法来解决这两个问题。代码如下:'

<js>
function openWindow(){
var browser=navigator.appName;
if (browser==”Microsoft Internet Explorer”)
{
window.opener=self;
}
window.open(‘filename.htm’,’null’,’width=900,height=750,
toolbar=no,scrollbars=no,location=no,resizable =yes’);
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height-100);
self.close();
}
</js>

'注意:如果窗口没有打开,请关闭此站点的弹出窗口拦截器

相关文章: