JSFiddle - React, Tailwind, and code Playground

HTML

<form>
<input type="text" id ="text1" />
<input type="text" id ="text2" />
    <input type="submit" name="submit"/>
    <script
      .
    </script>
</form>

JavaScript

$('form').find('input:submit').before('<input type="text"/>')