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