In a B/S system, we often need to obtain some information about the client, such as IP and Mac, for identity authentication. In ASP. net, it is easy to get the MAC address of the server, but it is really easy to get the MAC address of the client. The common practice is to call WIN32API or directly call the nbtstat command, there are a lot of problems with this, and the other method is to directly use the client script. Here we use JavaScript. The advantage of this is that it does not need to be processed by the server, but can be obtained by the client itself, it is passed to the server, and the speed and reliability are better than those obtained on the server.
The specific implementation of HTML and JavaScript is as follows:
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <meta content =" mshtml 6.00.2800.1106 "name =" generator "> <Object ID =" locator "classid =" CLSID: 76a64158-cb41-11d1-8b02-00600806d9b6 "viewastext> </Object> <br/> <Object ID =" foo "classid =" CLSID: 75718c9a-f029-11d1-a1ac-00c04fb6c223 "> </Object> <br/> <p>