Password Recheck script just call the values in get id to check the password matching or wrong. make this get password and retype password values simple method watch also have live demo.
JavaScript
Contains javascipt code add this script in input type id in javascript code $("#txtNewPassword") calling the input id.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript"><!-- function checkPasswordMatch() { var password = $("#txtNewPassword").val(); var confirmPassword = $("#txtConfirmPassword").val(); if (password != confirmPassword) { $("#divCheckPasswordMatch").html("Passwords do not match! Try Again ") document.oo.password2.focus(); return false; } else { $("#divCheckPasswordMatch").html("Passwords match. GOOD"); } } </script>
HTML Code
<section class="loginform cf"> <form name="oo" class="login" method="post" onsubmit="return checkPasswordMatch();" > <ul> <li> <label for="usermail">Email</label> <input name="usermail" size="40" placeholder="yourname@email.com"
required="" type="email" /> </li> <li> <label for="password">Password</label> <input type="password" id="txtNewPassword" size="40"
required="required" autocomplete="off" name="password"> </li> <li> <label for="password">Re-Password</label> <input type="password" autocomplete="off" size="40"
id="txtConfirmPassword" required="required" name="password2"> </li> <p class="registrationFormAlert" style="color:#F00; font-size:16px; margin:3px;" id="divCheckPasswordMatch"></p> <p align="center"><input type="submit" value="Sign up" name="go">
</p> </ul> </form> </section>
No comments:
Post a Comment