This article is mainly on the use of JS to obtain a computer MAC address and IP implementation of the introduction, the need for friends can come to the reference, I hope to help you.
JS get the computer MAC address and IP implementation code as follows://These two are ActiveX Plug-ins in the system used to obtain IP and physical address <object id=locator CLA Ssid=clsid:76a64158-cb41-11d1-8b02-00600806d9b6 viewastext> </OBJECT> <object Id=foo classid=clsid:75718c9a-f029-11d1-a1ac-00c04fb6c223> </OBJECT> <script language=jscript Event=onobjectready (objobject,objasynccontext) for=foo> if (objobject.ipenabled != NULL && objobject.ipenable D != "undefined" && objobject.ipenabled = true) &N Bsp { if (objobject.macaddress != NULL && Objobject. MACAddress != "undefined") macaddr = OBJOBJECT.MACADDRESS;&N Bsp &NBSP;IF (objobject.ipenabled && objobject.ipaddress (0) != NULL && Objobject.ipadd Ress (0) != "undefined") ipaddr = objobject.ipaddress (0); &nbs P if (objobject.dnshostname != NULL && Objobject.dnshostname & nbsp;!= "undefined") sdnsname = objobject.dnshostname;   ; } </SCRIPT> <script language=jscript> var service = Locator. ConnectServer (); var macaddr ; var IPAddr ; var domainaddr; var Sdnsna me; Service. Security_. impersonationlevel=3; service. Instancesofasync (foo, ' Win32_NetworkAdapterConfiguration '); </ script> <script language=jscript event= "oncompleted (HResult, Perrorobject Pasynccontext) " for=foo> alert (" Physical Address "+macaddr+" IP Address "+ipaddr+" host name "+ Sdnsname)) </SCRIPT> "