JSI judges whether the input IP address is legal

xiaoxiao2021-03-06  39

Function checkaddr (ipaddr) {if (TRIM (iPaddr) == "") {Return False;}

Var ss = ipaddr.split (".");

IF (s.LENGTH! = 4) {RETURN FALSE;}

VAR i = 0; for (i = 0; I 255) {Return False;}}

Return True;

}

Ayuan

9CBS certified blog expert

Blog expert

Huawei old employees

Big Data

More than ten years, in Huawei, Internet Corporation's experience, profound understanding and practical experience in CRM, big data, mainly sharing various project experience, including architecture, Java, big data and other articles

转载请注明原文地址:https://www.9cbs.com/read-47560.html

New Post(0)