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');
              }
jin 2011-2014
原文地址:https://www.cnblogs.com/hongtian/p/4267986.html