JS 跳转页面 在新的选项卡打开

时间:2023-03-08 22:59:54
JS 跳转页面 在新的选项卡打开
function going(url) {
var a = $("<a href='" + url + "' target='_blank'>Apple</a>").get(0); var e = document.createEvent('MouseEvents'); e.initEvent('click', true, true);
a.dispatchEvent(e);
console.log('event has been changed');
}

相关文章