Home >Web Front-end >JS Tutorial >Tencent's IP interface facilitates obtaining the current user's IP geographical location_javascript skills

Tencent's IP interface facilitates obtaining the current user's IP geographical location_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:15:221412browse

Tencent’s IP interface address: http://fw.qq.com/ipaddress

Show IP code
Call all

Copy code The code is as follows:


< ;script type=text/javascript>
document.write(IPData.join(' '));


Effect: xxx.xxx.xxx.xxx A certain city in a certain province

Only calls the geographical location
Copy the code The code is as follows:




Effect: XX city in XX province
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn