/ Published in: jQuery
![](/img/icon_sav.png?v3)
Check if passwords are the same on submit.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery('#register form').submit(function(event) { if(jQuery('#password_2').val() != jQuery('#confirmpassword_2').val()) event.preventDefault() });
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)