-
判断是否ip地址:
1
2
3
4
|
function
check_is_ip(s) {
var
patt = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/;
return
patt.test(s);
}
|