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.
|
|
|
function isTel(s) {
|
|
//var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?(\d){1,12})+$/;
|
|
var patrn = /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
|
|
if (!patrn.exec(s.value))
|
|
{
|
|
alert('非法的电话号码格式.');
|
|
return false;
|
|
}
|
|
return true
|
|
} |