According to the mobile phone number to find the place of attribution

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 ();   }        } 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.