1. <HTML>
2. <HEAD>
3. <TITLE> New Document </TITLE>
4. <META NAME=\"Generator\" CONTENT=\"EditPlus\">
5. <META NAME=\"Author\" CONTENT=\"\">
6. <META NAME=\"Keywords\" CONTENT=\"\">
7. <META NAME=\"Description\" CONTENT=\"\">
8. </HEAD>
9.   
10. <BODY>
11. <script language=\"javascript\">
12. function ipCheck()   
13. {   
14. ipValue=document.form1.ipaddr.value;   
15. var reg
16. if(reg.test(ipValue))   
17. {   
18. var ary = ipValue.split(\'.\');   
19. for(key in ary)   
20. {   
21. if(parseInt(ary[key]) >
22. {   
23. alert(\"IP error\");   
24. document.form1.ipaddr.focus();   
25. return false;   
26. }   
27. }   
28. }else{   
29. alert(\"IP error\");   
30. document.form1.ipaddr.focus();   
31. return false;   
32. }   
33. }   
34. </script>
35. <form method=\"post\" action=\"\" onsubmit=\"return ipCheck()\" name=form1>
36. <input type=text name=ipaddr>
37. <INPUT TYPE=\"submit\">
38. </form>
39. </BODY>
40. </HTML>