如何使用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');
答案 0 :(得分:0)
我在网上看了几个解决方案,但似乎没有任何东西可用于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>
` 注意:如果窗口未打开,请关闭此网站的弹出窗口拦截器