1、验证ip
function isIp(ip){ return /^(([01]?dd?|2[0-4]d|25[0-5]).){3}([01]?dd?|2[0-4]d|25[0-5])(/(0?[1-9]|[12]d|3[01]))?$/.test(ip); }
1、验证ip
function isIp(ip){ return /^(([01]?dd?|2[0-4]d|25[0-5]).){3}([01]?dd?|2[0-4]d|25[0-5])(/(0?[1-9]|[12]d|3[01]))?$/.test(ip); }