![]() ![]() Read more about the Win32_NetworkAdapterConfiguration object here (VS.85). Now the client can see his/her own MAC and IP Addresses. It involves the use of the address resolution protocol (ARP), which converts Internet protocol (IP) addresses into the MAC address. ![]() Then we can simply use textboxes to display that information or whatever you like.ĭocument.getElementById( "txtMACAdress").value = unescape(macAddress) ĭocument.getElementById( "txtIPAdress").value = unescape(ipAddress) ĭocument.getElementById( "txtComputerName").value = unescape(computerName) Īnd just like before, make sure to place the declarations snippet above this script for it to display the values properly. Finding the media access control (MAC) address, or hardware address, for the hosts on your network is a fairly simple process. Instead of Win32_Processor, here we'll access Win32_NetworkAdapterConfiguration to read network related details like the MAC Address, IP Address and the computer name. Var wmi = GetObject( "winmgmts:") Į = new Enumerator(wmi.ExecQuery( "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")) Ok if you're done reading, you'll notice we simply change the script to this: This is somewhat similar to the previous post Get client cpu id with javascript, so the client still needs to enable ActiveX components on his browser.
0 Comments
Leave a Reply. |