Obtain some information about the client, such as IP address and MAC address, in combination with identity authentication. I believe many people will do this. Here we use Javascript, the advantage of doing so is that the server does not need to be processed, and some clients can obtain it by themselves. If you are interested, you can refer to the following when you are working on a B/S structure system, we often need to obtain some information about the client, such as IP and MAC, in combination with identity authentication. It is easy to obtain the MAC address of the server, but it takes too much effort to obtain 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 html and javascript implementations are as follows::
The Code is as follows:
WMI Scripting HTML