<HTML>
<HEAD>
<TITLE>mac</TITLE>
<script type="text/javascript">
function load(){
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;
document.getElementById("mac").value=mac;
}
}
</script>
</HEAD>
<BODY onload="load()">
<input type="text" id="mac" name="mac" />
</BODY>
</HTML>
说明:基于IE acitvex控件,谷歌需要开发插件(也简单)