Home > Web Front-end > JS Tutorial > body text

js obtains the IP address and MAC address of the client network card_javascript skills

WBOY
Release: 2016-05-16 16:54:19
Original
3072 people have browsed it

复制代码 代码如下:










MAC地址:

IP地址:

主机名:








代码是网上找到,但是经过修改。

原因是比如你笔记本有多张网卡,会出现获取你未联网或者禁用网卡的信息,解决办法:加限制条件:

objObject.DNSServerSearchOrder!=null

加上这个限制条件后,就能取到联网客户端的网卡IP地址了。

不过还有个问题就是只能限制IE浏览器,而且Activex必须要全部启用。
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!