我有带有额外参数的window.open,它将在新窗口中打开给定的url。但是,当我每次使用不同的URL调用此window.open时,只要打开第一个窗口,它就不会打开新窗口。 如何打开多个URL的多个窗口?谢谢!
var newWindow = window.open(url,
"New window",
"toolbar=no," +
"scrollbars=no," +
"location=no," +
"statusbar=no," +
"menubar=no," +
"width=600," +
"height=300," +
"left=800," +
"top=300," +
"resizable=no"
);
答案 0 :(得分:2)
您每次需要使用一个不同的值,或者为_blank
参数使用windowName
。
var newWindow = window.open(url,
"_blank",
"toolbar=no," +
"scrollbars=no," +
"location=no," +
"statusbar=no," +
"menubar=no," +
"width=600," +
"height=300," +
"left=800," +
"top=300," +
"resizable=no"
);