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)
}
}
来源:oschina
链接:https://my.oschina.net/u/4417586/blog/4415340