Five methods for JS to obtain IP, MAC, and host name _ javascript skills

Source: Internet
Author: User
Javascript is a small program that obtains the Client IP address. The following code is tested on all windows and later systems. If you like it, you can add it to your favorites and start javascript today) A small program that obtains the IP address of the client. After searching the Internet, many of the current systems and browsers are ineffective and helpless, in Chrome and FireFox, JavaScript scripts such as obtaining IP addresses using ActiveX are rarely obtained. The following code passes all windows and later windows tests and provides the Code:

Method 1 (for IE only and the client's IE allows AcitiveX to run, through the platform XP, SERVER03, 2000 ):
Obtain the Client IP address.

The Code is as follows:




GetLocalIP


Get IP:

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.