17-10-2008 20:29:57
Đọc được đoạn này hay hay, copy tặng anh em
-------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script id="clientEventHandlersJS" type="text/javascript">
<!--
function btnGo_onClick() {
// Connect to WMI
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
// Get the info
var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
var e = new Enumerator (properties);
// Output info
document.write("<table border=1>");
document.write("<thead>");
document.write("<td>Caption</td>");
document.write("<td>MAC Address</td>");
document.write("</thead>");
for (;!e.atEnd();e.moveNext ())
{
var p = e.item ();
document.write("<tr>");
document.write("<td>" + p.Caption + "</td>");
document.write("<td>" + p.MACAddress + "</td>");
document.write("</tr>");
}
document.write("</table>");
}
//-->
</script>
</head>
<body>
<h1>MAC Address</h1>
<INPUT id="btnGo" name="btnGo" type="button" value="Go" onclick="javascript:btnGo_onClick()">
</body>
</html>