本文介绍了如何在所有浏览器中获取客户端mac地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好, 如何获取客户端mac地址。在这里我使用下面的脚本,但它的工作原理仅适用于所有浏览器。这个代码我托管在服务器中但是也没有检索任何值,即使也是。 脚本: - function callme(){ var macAddress = ; var ipAddress = ; var computerName = ; var wmi = GetObject( winmgmts: {impersonationLevel =冒充}); e = new 枚举器(wmi.ExecQuery( SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True)); for (;!e.atEnd(); e.moveNext()){ var s = e.item(); macAddress = s.MACAddress; ipAddress = s.IPAddress( 0 ); computerName = s.DNSHostName; alert(macAddress); document.getElementById(' ctl00_cplhControlPanel_macAddress')。 value = macAddress; } } 这里函数调用onclientevent。请在所有浏览器中帮助我解决方案 hi to all, How to get client mac address. here i using this below script but its works only in ie not in all browser. and this code i hosted in server but not retrieve any value even in ie also.SCRIPTS:-function callme() { var macAddress = ""; var ipAddress = ""; var computerName = ""; var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}"); e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")); for (; !e.atEnd() ; e.moveNext()) { var s = e.item(); macAddress = s.MACAddress; ipAddress = s.IPAddress(0); computerName = s.DNSHostName; alert(macAddress); document.getElementById('ctl00_cplhControlPanel_macAddress').value = macAddress; } }here this function call in onclientevent. kindly help me in all browser 解决方案 这篇关于如何在所有浏览器中获取客户端mac地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-31 02:30