HTML File
<div class="lbl">Password : </div>
<div class="ctrl" style="float: left;">
<input type="password" name="pwd">
<span id ="err_pword"></span>
</div>
Java Script File
function pwd_validation(pwd)
{
var reg = /^([A-z0-9!@#$%^&**-+/]{8,20})$/;
if (pwd.value.match(reg))
{
document.getElementById("err_pword").innerHTML = "";
return true;
}
else
{
document.getElementById("err_pword").innerHTML = "please enter valid Password...";
pwd.focus();
return false;
}
}
No comments:
Post a Comment