Click here to Skip to main content
15,891,725 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
Hi,


How to fix first number 7 or 8 or 9 in text box.
Posted
Comments
Manas Bhardwaj 6-Jul-12 5:53am    
If it was urgent, you would have atleast cared to explain your question properly.
Prasad_Kulkarni 6-Jul-12 6:35am    
This is not a well framed question. You must try by your self first and if you get stuck'd somewhere then post it here & we can help you to move on. This is not good practice.
[no name] 6-Jul-12 7:53am    
Well then since it is so urgent, the answer is
Sebastian T Xavier 6-Jul-12 8:44am    
urgent? don't be arrogant!!
Sandeep Mewara 6-Jul-12 9:07am    
Your question is not at all clear.. if u were so much in hurry.. and thing was urgent you should have formulated your question properly.

 
Share this answer
 
Comments
Arunprasath Natarajan 6-Jul-12 9:18am    
Gud 1
function validate()
{
if($("#txtMobile").val().substring(0,1) == '7' || $("#txtMobile").val().substring(0,1) == '8' || $("#txtMobile").val().substring(0,1) == '9')
{
old = $("#txtMobile").val();
}
else
{
$("#txtMobile").val("");
alert("please enter valid phone number")
}

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900