-2

advance thanks those who gives me the great tips about how to find Physical address by using javascript.

Balram Khadka
  • 47
  • 1
  • 1
  • 8

1 Answers1

3

Hope this helps!

function networkInfo(){

var wmi = new ActiveXObject ("WbemScripting.SWbemLocator");
var service = wmi.ConnectServer(".");


e = new Enumerator(service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"));


for(; !e.atEnd(); e.moveNext()) {
    var s = e.item();
    var macAddress = unescape(s.MACAddress);

}

return macAddress;
}
SC00PB
  • 113
  • 4
  • 7
    That will only work in Internet Explorer, and only if the user decides to give your plugin permission. – Robert Harvey May 15 '13 at 04:30
  • 1
    thanks your support but i already try your code this code is only execute in IE8 but i need to compatible to all browser when client access my web application. – Balram Khadka May 16 '13 at 03:46