通过javascript打开一个新窗口
我需要打开一个新窗口/弹出式菜单,并启用工具栏。通过javascript打开一个新窗口
我有这样的例子:http://jsfiddle.net/Pnb7y/13/
具有此代码:
window.open(this.href,"popupwindow", "width=800,height=500,left=200,top=5,scrollbars,toolbar=yes,resizable");
工具栏仅在Firefox中显示良好,但无法在Chrome或IE
你知道反正到显示器chrome中的工具栏?
注意:我想要的另一件事是隐藏地址......但我读过这是不可能的,由于安全原因...但如果你知道一种方式,我想知道。
最好的问候,丹尼尔
function pollwin(url,w, h)
{
pollwindow=window.open(url,'pollwindow','top=0,left=0,status=no,toolbars=no,scrollbars=no,width='+w+',height='+h+',maximize=no,resizable');
pollwindow.focus();
}
不显示铬中的工具栏 – Shin 2013-05-06 11:41:08
使用焦点()无法工作。看看这里:http://jsfiddle.net/Pnb7y/18/ – 2013-05-06 11:53:13
为我工作:) – 2013-05-06 11:56:10
window.open(this.href,"popupwindow", "width=800,height=500,left=200,top=5,scrollbars,toolbar=yes,resizable");
使用此
window.open(this.href,"popupwindow", "width=800,height=500,left=200,top=5,scrollbars,toolbar=yes,resizable",target="_blank");
不能使用_blank ...看看这里:http://jsfiddle.net/Pnb7y/18/ – 2013-05-06 11:53:31
不幸的是,镀铬只是不支持它。 – Jonathan 2013-05-06 11:35:42
http://stackoverflow.com/questions/2568064/how-to-window-open-with-a-toolbar-in-google-chrome – Satpal 2013-05-06 11:44:28
我可以用另一条指令打开一个新窗口吗? – 2013-05-06 12:03:00