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> <form action="/" onsubmit="alert('submit event')"></code> and <code><button type="submit" onclick="alert('button onclick handled before form submit')"></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
Reviewed by Bhaumik Patel
on
7:10 PM
Rating: