<form action="cakes.php" method="post">
<tr>
<td>Phone Number *</td>
<td><input id="phone" name="phone" required /></td>
</tr>
</form>
<script type="text/javascript">
$("#phone").change(function()
{
var phoneno = /^\d{10}$/;
if(($(this).val().match(phoneno)) )
{
return true;
}
else
{
alert("Enter the 10 Digit Mobile Number");
return false;
}
});
</script>
No comments:
Post a Comment