获取本机mac地址

function MacInfo(){
    //访问到WbemScripting对象
    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;
        return mac;
}

 

获取本机mac地址

上一篇:服务器(Linux)缓冲跟踪类型的系统调用分析


下一篇:十二 Linux之tar解压缩