Html
<Div> <P>Click on the button below to view local IP information</P> <spanclass= "span">Click to view</span> <Pclass= "CIP"></P> <Pclass= "CID"></P> <Pclass= "CNAME"></P> </Div>
Css
Html,body{Height:100%; }Body{margin:0}Div{Padding-left:50px; }. Span{padding:5px 15px;background:#177ad8;Color:#fff;font-size:14px;text-decoration:None;Border-radius:7px;cursor:Pointer; }
Javascript
<script src= "Http://pv.sohu.com/cityjson?ie=utf-8" ></script><script> var ipspan = Document.queryselector (". span"); =function() { document.queryselector (". CIP"). InnerHTML =returncitysn[' CIP ']; Document.queryselector (". Cid"). InnerHTML =returncitysn[' CID ']; Document.queryselector (". CName"). InnerHTML =returncitysn[' cname ']; } </script>
This interface is Sohu is currently available, is not aware of the future will not expire
JS read local IP address information