SOURCE

console 命令行工具 X clear

                    
>
console
<!-- 
  Use Emmet shortcuts to even faster experience.
  For an example: type div#root and press Tab.
-->

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <!-- Styles will be included here automatically -->
    <link rel="stylesheet" href="style.css" />
  </head>

  <body>
    <h1 id="modalDlg"></h1>

    <!-- <div class="modal-dlg-container">
      <header class="modal-dlg-header">
        <h2 class="modal-dlg-title">コイル情報入力</h2>
        <span class="modal-dlg-close"><i class="fas fa-times-circle"></i></span>
      </header>
      <div class="modal-dlg-main"></div>
      <div class="modal-dlg-btn-container">
        <button
          id="modalDlgCancel"
          class="modal-dlg-btn modal-dlg-cancel"
          type="button"
        >
          キャンセル
        </button>
        <button
          id="modalDlgOk"
          class="modal-dlg-btn modal-dlg-ok"
          type="button"
        >
          OK
        </button>
      </div>
    </div> -->

    <!-- Scripts will be included here automatically with type="module" -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"
      integrity="sha512-uto9mlQzrs59VwILcLiRYeLKPPbS/bT71da/OEBYEwcdNUk8jYIy+D176RYoop1Da+f9mvkYrmj5MCLZWEtQuA=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
    ></script>
    <script
      src="https://kit.fontawesome.com/22f2e5fbfb.js"
      crossorigin="anonymous"
    ></script>
    <script src="script.js" crossorigin="anonymous"></script>

    <script>
      // $(".modal-dlg-container").draggable();
      let dlgdd;
      let dlgHtml;
      let newDlg;
      dlgId = $("#modalDlg");
      dlgHtml = dlgId.prop("outerHTML");
      console.log(dlgHtml);
      newDlg =
        '<div class="modal-dlg-container"><header class="modal-dlg-header"><h2 class="modal-dlg-title">コイル情報入力</h2><span class="modal-dlg-close"><i class="fas fa-times-circle"></i></span></header><div class="modal-dlg-main">' +
        dlgHtml +
        '</div><div class="modal-dlg-btn-container"><button class="modal-dlg-btn modal-dlg-cancel"type="button">キャンセル</button><button class="modal-dlg-btn modal-dlg-ok"type="button">OK</button></div></div>';
      $("#modalDlg").replaceWith(newDlg);
      console.log(newDlg);
    </script>
  </body>
</html>