JS取得電腦mac位址以及IP的實作方法 複製程式碼 程式碼> //這兩個是系統裡的ActiveX插件 用來取得ip以及實體位址 < jObject.IPEnabled != "undefined " && objObject.IPEnabled == true) <P> { <BR> if(objObject.MACAddress != null && objObject.MACAddress objObject.MACAddress; <BR> if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined ") <BR> IPAddr = objObject.IPAddress(0); <Hp. && objObject.DNSHostName != "undefined ") <BR> sDNSName = objObject.DNSHostName; <BR><BR> } <BR> service = locator.ConnectServer(); var MACAddr ; var IPAddr ; var DomainAddr; var sDNSName cesOfAsync(foo, 'Win32_NetworkAdapterConfiguration '); alert("物理地址" MACAddr "IP地址" IPAddr "主機名" sDNSName)) "