javascript check retype password - Mostlikers

13 May, 2013

javascript check retype password

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.


Contains javascipt code add this script in input type id in javascript  code $("#txtNewPassword") calling the input id.

<script type="text/javascript" src=""></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 ") 
      return false;
      $("#divCheckPasswordMatch").html("Passwords match. GOOD");


<section class="loginform cf">
    <form name="oo" class="login" method="post" onsubmit="return checkPasswordMatch();" >
          <label for="usermail">Email</label>
          <input name="usermail" size="40" placeholder="" 
          required="" type="email" />
          <label for="password">Password</label>
          <input type="password"  id="txtNewPassword" size="40" 
            required="required" autocomplete="off" name="password">
          <label for="password">Re-Password</label>
          <input type="password"  autocomplete="off" size="40" 
            id="txtConfirmPassword" required="required"  name="password2">
          <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">

Live Demo

No comments:

Post a Comment