1. form number range Verification:
Latitude: 360) {this. value = 360;} ">& Nbsp; degree & nbsp; & Nbsp; points & nbsp; >& Nbsp; seconds | <Script type = "text/javascript">Function check_num_value (obj_name, obj, minvalue, maxvalue ){Var reg =/^ [0-9] + $ /;If (obj. value! = ""&&! Reg. test (obj. value )){Alert (obj_name + 'can only enter numbers! ');Obj. value = "";Obj. focus ();Return false;} Else if (minvalue> obj. value | obj. value> maxvalue ){Alert (the range of obj_name + "is" + minvalue + "-" + maxvalue + "! ");Obj. value = "";Obj. focus ();Return false;}}</Script>
Ii. Email Verification
The indexOf () method of the String object returns the starting position of the String passed in through the parameter, and the mailbox address must be similar to the structure of the username@website.com, in the user-submitted String marked as the mailbox address, through indexOf ("@") and indexOf (". ") the return value of the method can determine the validity of the email address. Test the following code:
<Script language = "JavaScript" type = "text/javascript">
</Script>