Tuesday, October 21, 2014

validation for textbox in javascript

Posted by Unknown  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 <!DOCTYPE html>  
 <html>  
 <head>  
 <script>  
 function validateForm() {  
   var x = document.forms["myForm"]["fname"].value;  
   if (x==null || x=="") {  
     alert("First name must be filled out");  
     return false;  
   }  
 }  
 </script>  
 </head>  
 <body>  
 <form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post">  
 First name: <input type="text" name="fname">  
 <input type="submit" value="Submit">  
 </form>  
 </body>  
 </html>  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


3:33 AM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top