Tip: you can modify some code before running
Js detection ip program function checkIP () {var ipArray, ip, j; ip = document. ipform. ip. value; if (/[A-Za-z _-]/. test (ip) {if (! /^ ([W-] + .) + (com) | (net) | (org) | (gov.cn) | (info) | (cc) | (com.cn) | (net.cn) | (org.cn) | (name) | (biz) | (TV) | (cn) | (mobi) | (name) | (sh) | (ac) | (io) | (tw) | (com.tw) | (hk) | (com.hk) | (ws) | (travel) | (us) | (tm) | (la) | (me. uk) | (org. uk) | (ltd. uk) | (plc. uk) | (in) | (eu) | (it) | (jp) $ /. test (ip) {alert ("incorrect domain name"); document. ipform. ip. focus (); return false ;}} else {ipArray = ip. split (". "); j = ipArray. lengthif (j! = 4) {alert ("incorrect IP address"); document. ipform. ip. focus (); return false ;}for (var I = 0; I <4; I ++) {if (ipArray [I]. length = 0 | ipArray [I]> 255) {alert ("incorrect IP address"); document. ipform. ip. focus (); return false ;}}}}
Tip: you can modify some code before running