JSFiddle - React, Tailwind, and code Playground

by grammar

HTML

<div id="body">
  <div id="Form Box">
    <form id="frm1" action="/action_page.php">
      Insult: <input type="text" name="fname" id="userInput"><br>
      <input type="button" value="Submit" onclick="othername();"  >
    </form>
    <script>
        function othername() {
          var input = document.getElementById("userInput").value;
          alert(input);
        }
    </script>
  </div>
</div>