JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript">
    function validate () {
        alert('start');        
        $('#myform').submit();
        alert('end');        
    }
    </script>
</head>
<body>
    <form id="myform" name="myform" method="post" action="">
        <input type="button" value="submit" id="submitx" onclick="validate();" >
    </form>
</body>
</html>