gistfile1.txt 当window.open(url,"_blank"),无效时,可用如下方法。function openwin(url) {var a = document.createElement("a");a.setAttribute("href", url);a.setAttribute("target", "_blank");a.setAttribute("id", "camnpr");document.bo
当window.open(url,"_blank"),无效时,可用如下方法。
function openwin(url) {
var a = document.createElement("a");
a.setAttribute("href", url);
a.setAttribute("target", "_blank");
a.setAttribute("id", "camnpr");
document.body.appendChild(a);
a.click();
}
以上所述是小编给大家介绍的基于JavaScript实现在新的tab页打开url,
