You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
288 B
Plaintext

11 months ago

function isMobil(c) {
var patrn = /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
if (c.value == '')
return;
if (!patrn.exec(c.value)) {
c.focus();
c.select();
alert('非法的手机号码.');
return false;
}
return true
}