js 獲取mac地址

 

js 獲取mac地址code

function MacInfo(){
       var locator =new ActiveXObject ("WbemScripting.SWbemLocator");
       var service = locator.ConnectServer(".");
       var properties = service.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled =True");
       var e =new Enumerator (properties);
       {
             var p = e.item();
            var mac = p.MACAddress;
            alert(mac)
       }
 }
相關文章
相關標籤/搜索