如何使用javascript window.open在最新版本(Firefox、chrome和internet Explour)中隐藏地址栏
如何使用javascript window.open在最新版本的Firefox、chrome和internet Explorer中隐藏地址栏 我使用下面的代码,但它不工作如何使用javascript window.open在最新版本(Firefox、chrome和internet Explour)中隐藏地址栏,javascript,google-chrome,Javascript,Google Chrome,如何使用javascript window.open在最新版本的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'); 我在网
var popup = window.open('@Url.Action("LoanTaggingErrorReport","Finance")',
'name','width=900,height=750,
toolbar=no,scrollbars=no,location=no,resizable =yes');
我在网上看了两个解决方案,但IE和Firefox在一起工作时似乎什么都没有。然后我想出了一个办法来解决这两个问题。代码如下: ` `
注意:如果窗口未打开,请关闭此站点的弹出窗口阻止程序它也不适用于chrome。因为winodow.open location=no的参数在任何浏览器中都不起作用
<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>