Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

JavaScript Form Validation-Simple Input box Validation-JavaScript Validation


Java Script Validation



JavaScript Validation its important the web page  because user attractive the form. Webpage user click   the empty   input box validate JavaScript. Through alert message JavaScript provides you the facility the validate the form on the client side so processing will be fast than server-side validation. So, most of the web developers prefer JavaScript form validation   

Through JavaScript, we can validate name, password, email, date, mobile number etc fields.

Simple Form Validation Bellow:












function validateform(){

var name=document.online.name.value;

var password=document.online.password.value;



if (name==null || name==""){

alert("Name can't be blank");

return false;

}else if(password.length

alert("Password musst be 8 chracters ");

return false;

}

}








Name:

Password:










Simple Password Validation







="text/javascript">


function msg(){



var pass21=document.online.pass.value;



var pass1=document.online.pass2.value;



if(pass21==null || pass21=="" & pass1==null || pass1==""){


alert('fill the fist fild');


}



else if(pass21==pass1)


{

alert("same fileds");

return true;


}

else{


alert("not match please try agin");

}


}




name
="online" method="post" >


Password:type="password" name="pass">



Re-Type Password:type="password" name="pass2">






type="submit" name="valit" value="Validate" onclick="msg()">








Share the post

JavaScript Form Validation-Simple Input box Validation-JavaScript Validation

×

Subscribe to Webdesign | Seo Services Full Tutorial | Php Full Tutorial | Javascript Full Tutorial|html,css,cms

Get updates delivered right to your inbox!

Thank you for your subscription

×