Advertisement
Guest User

mac id

a guest
Feb 4th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4. <script id="clientEventHandlersJS" type="text/javascript">
  5. <!--
  6. function btnGo_onClick() {
  7. // Connect to WMI
  8. var locator = new ActiveXObject("WbemScripting.SWbemLocator");
  9. var service = locator.ConnectServer(".");
  10.  
  11. // Get the info
  12. var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
  13. var e = new Enumerator (properties);
  14.  
  15. // Output info
  16. document.write("<table border=1>");
  17. document.write("<thead>");
  18. document.write("<td>Caption</td>");
  19. document.write("<td>MAC Address</td>");
  20. document.write("</thead>");
  21. for (;!e.atEnd();e.moveNext ())
  22. {
  23. var p = e.item ();
  24. document.write("<tr>");
  25. document.write("<td>" + p.Caption + "</td>");
  26. document.write("<td>" + p.MACAddress + "</td>");
  27. document.write("</tr>");
  28. }
  29. document.write("</table>");
  30. }
  31. //-->
  32. </script>
  33. </head>
  34. <body>
  35. <h1>MAC Address</h1>
  36. <INPUT id="btnGo" name="btnGo" type="button" value="Go" onclick="javascript:btnGo_onClick()">
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement