js 获取mac地址

js 获取mac地址

 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)
}
}

  

上一篇:uva :10123 - No Tipping(dfs + 几何力矩 )


下一篇:socket.io问题,io.sockets.manager.rooms和io.sockets.clients('particular room')这两个函数怎么用?