我有 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"
);
最佳答案
您需要每次使用不同的值,或者为 windowName
参数使用 _blank
。
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"
);
关于javascript window.open 没有为不同的网址打开不同的窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56496984/