HTML dialog

html = <<~HTML
  <html>
    <head>
      <title>输入参数</title>
      <meta charset="UTF-8">
      <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
      <form>
        <label for="span">Direction:</label>
        <input type="radio" name="direction" value="right" checked> Right
        <input type="radio" name="direction" value="left"> Left
        <input type="radio" name="direction" value="top"> Top
        <input type="radio" name="direction" value="bottom"> Bottom
        <br>
        <label for="span">Span ( mm ):</label>
        <input type="number" id="span" name="span" value="3600"><br>
        <label for="count">Number of bays:</label>
        <input type="number" id="count" name="count" value="1"><br>
        <input type="button" value="Add" onclick="submitForm();">
      </form>
      <script>
        function submitForm() {
          var direction = document.querySelector('input[name="direction"]:checked').value;
          var span = document.getElementById("span").value;
          var count = document.getElementById("count").value;
          window.location.href = "skp:submitForm@" + direction + "@" + span + "@" + count;
        }
      </script>
    </body>
  </html>
HTML
dialog.set_html(html)
© AWhouse