-2

提前感谢那些给我有关如何使用 javascript 查找物理地址的重要提示的人。

4

1 回答 1

3

希望这可以帮助!

function networkInfo(){

var wmi = new ActiveXObject ("WbemScripting.SWbemLocator");
var service = wmi.ConnectServer(".");


e = new Enumerator(service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"));


for(; !e.atEnd(); e.moveNext()) {
    var s = e.item();
    var macAddress = unescape(s.MACAddress);

}

return macAddress;
}
于 2013-05-15T04:19:30.710 回答