4
Answers

Confirm password validation in javascript?

sudharsan s

sudharsan s

12y
5.3k
1
hi ...


 below code is my pwd and confirm pwd required filed validation in javascript..

now i want to chk this pwd and confirm pwd should same using javascript code...

help me to give confirm password validation in javascript.


if (document.getElementById("<%=txtpwd.ClientID %>").value == "") {
  alert("(*)Enter the password");
  document.getElementById("<%=txtpwd.ClientID %>").focus();
  return false;
  }

  if (document.getElementById("<%=txtConfirmPwd.ClientID %>").value == "") {
  alert("(*)Enter the Confirm Password");
  document.getElementById("<%=txtConfirmPwd.ClientID %>").focus();
  return false;
  }

Advanx THx
Answers (4)