获取的话,应该网上有代码,可以借鉴
<script language="javascript">
var sMacAddr=""
var sIPAddr=""
var sDNSName=""
var service = locator.ConnectServer()
service.Security_.ImpersonationLevel=3
service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration')
</script>
<script FOR="foo" EVENT="OnObjectReady(objObject,objAsyncContext)" LANGUAGE="JScript">
if(objObject.IPEnabled != null &&objObject.IPEnabled != "undefined" &&objObject.IPEnabled == true){
if(objObject.IPEnabled &&
objObject.IPAddress(0) !=null &&objObject.IPAddress(0) !=
"undefined")
sIPAddr = objObject.IPAddress(0)
if(objObject.MACAddress != null &&objObject.MACAddress != "undefined")
sMacAddr = objObject.MACAddress
if(objObject.DNSHostName != null &&objObject.DNSHostName != "undefined")
sDNSName = objObject.DNSHostName
}
</script>
js返回给服务器,通过ajax远程请求吧.
或者直接把数据当做参数,通过跳转传递给服务器.
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)