HTML File
<div class="lbl">Pincode : </div>
<div class="ctrl">
<input type="number" name="pin">
<span id ="err_pin"></span>
</div>
Java Script File
function pin_validation(pin)
{
var reg = /^([0-9]{6})$/;
if (pin.value.match(reg))
{
document.getElementById("err_pin").innerHTML = "";
return true;
}
else
{
var msg = "please enter valid Pincode...";
document.getElementById("err_pin").innerHTML = msg;
pin.focus();
return false;
}
}
Nice list. although i use pincodebox for the search
ReplyDelete