可用于点击 <li>、<span> 等元素动作
1 function openNewWindow(url) { 2 var a = $("<a href='" + url + "' target='_blank'>" + url + "</a>").get(0), 3 e = document.createEvent('MouseEvents'); 4 e.initEvent("click", true, true); 5 a.dispatchEvent(e); 6 }
标签:原生,url,JS,超链接,true,新窗口 From: https://www.cnblogs.com/easysky/p/17358086.html