//移动电话检验
function isMobile(controller)
{
if(controller == null || controller == "")
{
return false;
}
var reg = new RegExp(/^[1-9][0-9]{10}$/);
if(reg.test(controller) == false)
{
return false;
}
return true;
}
/**
* 校验普通电话,除数字外,可含有“-”
* @param telno 要检验的数据
*/
function checkTelephone(telno)
{
if (!checkstring_allSpace(telno))
return false;
telno = trim(telno);
if (telno.length == 0)
return true;
//var patrn=/^[+]?/d{1,3}?([-]?/d{1,12})*$/;
//"兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)"
var patrn=/^(([0/+]/d{2,3}-)?(0/d{2,3})[-]?)?(/d{7,8})(-(/d{3,}))?$/
if (!patrn.test(telno))
return false;
return true;
}