通过javascript打开一个新窗口

时间:2013-05-06 11:31:43

标签: javascript popup

我需要在启用工具栏的情况下打开一个新窗口/弹出窗口。

我有这个例子: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中显示工具栏吗?

注意:我想要的另一件事就是隐藏地址......但我已经读过,由于安全原因,这是不可能的......但如果你知道一种方法,我想知道。< / p>

最好的问候,丹尼尔

2 个答案:

答案 0 :(得分:0)

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();
}

答案 1 :(得分:0)

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");
相关问题