function CheckIndianNumber(IndianNumber) {
var IndNum = /^\d{10}$/;
if (IndNum.test(IndianNumber)) {
// alert("Your Mobile Number Is Valid.");
}
else {
alert("Your Mobile Number Is Not Valid.");
}
}
<asp:TextBox ID="txtMB" runat="server" Height="44px" Width="158px" onblur="CheckIndianNumber(txtMB.value)"></asp:TextBox>
var IndNum = /^\d{10}$/;
if (IndNum.test(IndianNumber)) {
// alert("Your Mobile Number Is Valid.");
}
else {
alert("Your Mobile Number Is Not Valid.");
}
}
Call on textbox event:-
<asp:TextBox ID="txtMB" runat="server" Height="44px" Width="158px" onblur="CheckIndianNumber(txtMB.value)"></asp:TextBox>
No comments:
Post a Comment