Form with the default HTML5 button submit event hierarchy

Before submit event jquery

<form action="#" method="post" onsubmit="alert('submit event')">
     <h3>Form with the default HTML5 button[type=submit] event hierarchy.</h3>
    <div>
        <br/>using <code> &lt;form action="/" onsubmit="alert('submit event')"&gt;</code> and <code>&lt;button type="submit" onclick="alert('button onclick handled before form submit')"&gt;</code> 
        <br/>
        <input type="text" name="text" value="Test" />
        <button type="submit" onclick="alert('button onclick handled before form submit')">Recommended Submit Method</button>
    </div>
</form>
DEMO
Form with the default HTML5 button submit event hierarchy Form with the default HTML5 button submit event hierarchy Reviewed by Bhaumik Patel on 7:10 PM Rating: 5