var
el = document.createElement(
"a"
);
document.body.appendChild(el);
el.href = url;
//url 是你得到的连接
el.target =
‘_new‘
;
//指定在新窗口打开
el.click();
document.body.removeChild(el);
转自:http://www.cnblogs.com/wushuaizaiza/p/5567565.html
时间: 2024-11-08 16:50:52