JSFiddle - React, Tailwind, and code Playground
by jfriend00
HTML
<form name="form1" id="form1" method="post">
<input type="submit" id="submit" name="check" onclick="check()" />
</form>
JavaScript
alert(document.getElementById("form1").method);