归属地为:'+province+'
');
}else{
$searchPhonearea.html("
查找失败,请确认输入是否正确...
");
}
}
//验证手机号
function searchAreaMobilePhoneFromIndex(mobileNo){
if (mobileNo == "") { alert("手机号不能为空"); return (false); }
if (mobileNo.length != 11) { alert("请输入11位手机号"); return (false); }
if (isNaN(mobileNo)){ alert("请输入11位数字"); return (false); }
return true;
}
/*function outPhoneArea($searchPhonearea,xml){
var phonenum = $(xml).find('phonenum').text();
var locations = decodeURIComponent($(xml).find('locations').text());
if(phonenum>0){
$searchPhonearea.html('
归属地为:'+locations+'
');
}else{
$searchPhonearea.html("
查找失败,请确认输入是否正确...
");
}
} */
//查询手机归属地
function searchMobilePhoneGuiSuArea(mobileNo){
var $searchPhonearea = $("#searchPhoneArea");
$searchPhonearea.html("
");
$.ajax({
type:"GET",
url:"getContent.asp",
dataType:"xml",
data:"chgmobile="+mobileNo,
success:function(responseObj){
outPhoneArea($searchPhonearea,responseObj);
},
error:function(xml){
outPhoneArea($searchPhonearea,xml);
}
});
}