Question:

How to add javascript verification?

by  |  earlier

0 LIKES UnLike

Ok i have a fairly complex form i am creating, I now need to add to my if statments rules like a-zA-Z and 0-9 and so on... Do you know of a good website or some examples of how to use very strick set of rules in javascript? So far i have rules like ....

if (form1.Name.value == "") {

alert( "Please enter your Name" );

form1.Name.focus();

return false ;

 Tags:

   Report

1 ANSWERS


  1. To check for something like a-zA-Z or 0-9, or any other pattern for that matter you'll want to use regular expressions. There's a good tutorial here:

    http://www.webreference.com/js/column5/

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.