According to the mobile phone number to find the place of attribution
Last Update:2018-07-20
Source: Internet
Author: User
Mobile phone ownership Query function searchmobilearea () { var phone=$.trim ($ ("#key_S"). Val (); if (Searchareamobilephonefromindex (phone)) {//Verify phone number searchmobilephoneguisuarea (phone)/search for the place where the handset belongs } } //Verification mobile phone number Function searchareamobilephonefromindex (Mobileno) { if (mobileno == "") { alert ("Cell phone number cannot be empty"); return (false); } if (mobileno.length != &NBSP;11) { alert ("Please enter 11-digit mobile number"); return (false); } if (isNaN (Mobileno)) { alert ("Please enter 11 digits"); return (false); } return true; } //Search cell phone ownership function searchmobilephoneguisuarea (Mobileno) { var $searchPhonearea = $ ("#searchPhoneArea"); $searchPhonearea. HTML ("<div class= ' loadingdiv ' style= ') width:150px; ' ><div class= ' Loadingarea ' > query, please wait ...</div></div> "); $.ajax ({ &nbsP; type: "POST", url: "Https://service.sh.10086.cn/tools.do?method=getPhoneNativeInfo", datatype: "Text", data: "phone=" +mobileno, success:function (res) { var mobilehtml = ""; if (res!= "-1" && res!= "-2") { mobilehtml += ' <div> Enquiry Number: <span class= "Fonthigh" > ' +mobileno+ ' </span></div> '; var result=res.split (";"); if (result[1]==result[3]) { mobilehtml += ' <div> attribution to: <span class= "Fonthigh" > ' +result[1]+ ' < /span></div> '; } else { &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBsp; mobilehtml += ' <div> belong to: <span class= "Fonthigh" > ' +result[1]+ ' ' +result[3]+ ' </span></div> '; } mobilehtml += ' <div> area code: <span class= "Fonthigh" >0 ' +result[2] + ' </span></div> '; $searchPhonearea. HTML ( mobilehtml ); $ ("#key_S"). Val (""); } else { $searchPhonearea. HTML (" <span class= ' Fonthigh ' > Very sorry! There is no information you need in the System ...</span> "); } }, error:function (XML) { $searchPhonearea. HTML (" <span class= ' Fonthigh ' > Very sorry! There is no information you need in the System ...</span> "); } &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP}); } function searchmobileareabykeydown (event,obj) { var event=event| | window.event; &NBSP;&NBSP;&NBSP;&NBsp; if (event.keycode == 13) { searchmobilearea (); } }