[JS] 創建 ActiveX 獲取 Mac Address 位址

此代碼僅限 IE 使用,不知道到有沒有更好的方法?
Get Mac Address by JavaScript and ActiveX

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

留言

本月最夯

偷用電腦,怎知?事件檢視器全記錄!(開機時間、啟動項時間...)