在firefox&;中打开不带地址栏的新弹出窗口;即
希望有人能帮忙。如果没有地址栏,就无法在Firefox中打开新窗口。IE可以很好地处理以下代码在firefox&;中打开不带地址栏的新弹出窗口;即,firefox,address-bar,Firefox,Address Bar,希望有人能帮忙。如果没有地址栏,就无法在Firefox中打开新窗口。IE可以很好地处理以下代码 window.open('/pageaddress.html', 'winname', directories=0,titlebar=0,toolbar=0,location=0,status=0, menubar=0,scrollbars=no,resizable=no, width=400,height=350); 我需要对所有浏览器进行检查。 窗口功能(“目
window.open('/pageaddress.html', 'winname',
directories=0,titlebar=0,toolbar=0,location=0,status=0,
menubar=0,scrollbars=no,resizable=no,
width=400,height=350);
我需要对所有浏览器进行检查。
窗口功能(“目录=…,…,高度=350”)等。参数应为字符串:
window.open('/pageaddress.html','winname',"directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0,scrollbars=no,resizable=no,width=400,height=350");
如果在你的浏览器中有效,试试看。请注意,某些功能可能会被用户首选项覆盖,例如“位置”(请参阅文档)。Firefox 3.0及更高版本在默认情况下禁用了设置
location
<默认情况下,代码>可调整大小和状态
也被禁用。您可以通过在地址栏中键入'about:config'并通过“dom”进行过滤来验证这一点。有关项目包括:
- dom.disable\u window\u open\u feature.location
- dom.disable\u window\u open\u feature.resizeable
- dom.disable\u window\u open\u feature.status
window.open('/pageaddress.html','winname','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=350');
检查一下这个,如果有用的话对我来说没问题
<script>
var windowObjectReference;
var strWindowFeatures = "menubar=no,location=no,resizable=no,scrollbars=no,status=yes,width=400,height=350";
function openRequestedPopup() {
windowObjectReference = window.open("http://www.flyingedge.in/", "CNN_WindowName", strWindowFeatures);
}
</script>
var-windowObjectReference;
var strWindowFeatures=“menubar=no,location=no,resizable=no,scrollbars=no,status=yes,width=400,height=350”;
函数openRequestedPopup(){
windowObjectReference=window.open(“http://www.flyingedge.in/“,“CNN\u WindowName”,strWindowFeatures);
}
解决方法-打开一个模式弹出窗口,并将外部URL作为iframe嵌入。在internet explorer中,如果新URL与当前URL来自同一域,则该窗口将在没有地址栏的情况下打开。否则,它将导致出现地址栏。一种解决方法是从同一域打开一个页面,然后从该页面重定向 我知道这是一个非常古老的问题,是的,我同意我们不能在现代浏览器中隐藏地址栏,但我们可以在地址栏中隐藏url(例如show urlabout:blank
),下面是我的解决方案
var iframe = '<html><head><style>body, html {width: 100%; height: 100%; margin: 0; padding: 0}</style></head><body><iframe src="https://www.w3schools.com" style="height:calc(100% - 4px);width:calc(100% - 4px)"></iframe></html></body>';
var win = window.open("","","width=600,height=480,toolbar=no,menubar=no,resizable=yes");
win.document.write(iframe);
var-iframe='body,html{width:100%;height:100%;margin:0;padding:0}';
var win=window.open(“,”,“宽度=600,高度=480,工具栏=no,菜单栏=no,可调整大小=yes”);
win.document.write(iframe);
感谢您的回答,因为您说它已被禁用firefox@Intelekshual标题栏未隐藏。登录IE、FF、Chrome和OperaCould,你可以看看这个:不,这不起作用,至少在当前的Firefox中不起作用。菜单栏和srollbar被禁用,但地址栏仍然显示,窗口仍然可以调整大小。在现代Firefox中,这种愚蠢的做法不起作用。Firefox 3注意到,Firefox 3中的dom.disable_window_open_feature.location现在默认为true,强制显示位置栏,就像IE7中一样。有关更多信息,请参阅错误337344。所以在Firefox3下面,只有隐藏位置栏才有效。这在MS Edge中也不起作用。。。所有这些参数和其他窗口功能都被忽略。标题栏不隐藏。签入IE、FF、Chrome和Operalocation bar不仅隐藏了我还测试了窗口功能:使用windowFeatures=“menubar=yes,location=yes,resizeable=yes,scrollbars=yes,status=yes”
或windowFeatures=“menubar=no,location=no,resizeable=no,scrollbars=no,status=no”
完全没有区别,也就是说,结果完全相同。在没有url的情况下,打印效果非常好!不知道这对被问到的问题是否有好处!