以下の内容はhttps://tech.motoki-watanabe.net/entry/2020/06/02/011209より取得しました。


window.openでウィンドウをポップアップさせる

window.open

JSでwindow.openとやるとウィンドウをポップアップで出せます。

また、hrefにそのウィンドウのURL入れるとおもうんですけど普通にやるとポップアップも出すのと同時に遷移しちゃうので、その動作自体の無効化が必要です。

aタグの無効化 - preventDefaultとreturn falseの違いとか - Qiita

a(href='#####', data-window-width='560', data-window-height='500' class='js-popup')
forEach(document.querySelectorAll('.js-popup'), ($target) => {

      const windowWidth = $target.getAttribute('data-window-width');
      const windowHeight = $target.getAttribute('data-window-height');

      $target.addEventListener('click', ($element) => {

        $element.preventDefault();
        window.open($target.getAttribute('href'), null, `width=${windowWidth}, height=${windowHeight}`);
      });
    });
  }

これでポップアップウィンドウを出せます。




以上の内容はhttps://tech.motoki-watanabe.net/entry/2020/06/02/011209より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14