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');
              }
相關文章
相關標籤/搜索