$("input[name='srcIp']").blur(function() {
var value = $(this).val();
var reg = /^(\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])\.(\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])$/;
if(!value.match(reg)) {
alert("wrong!");
}
});
ipV4地址正则表达式
最新推荐文章于 2024-08-20 09:48:07 发布