Jquery ajax obtains the region name of the IP address from pure net (cz88.net ).

Source: Internet
Author: User

Copy codeThe Code is as follows:
<Html>
<Head>
<Title> jquery demo </title>
<Script type = "text/javascript" src = "http://img.jb51.net/jslib/jquery/jquery-1.3.2.min.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# Cz88"). load ("http://www.cz88.net/ip/viewip468.aspx ");
$ ("# Cz88"). ajaxStop (function (){
Var ip = $ ("# cz88 # AddrMessage"). text ();
$ ("# Ip"). val (ip );
})
})
</Script>
</Head>

<Body>
<Div id = "cz88" style = "display: none;"> </div>
<Input type = "text" name = "ip" id = "ip"/>
</Body>
</Html>

Save the token, for example, get.htm.

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.