function GetLocalIPAddr () document.write(GetLocalIPAddr()+ '') Method 1 (IE for IE only and client side allows AcitiveX to run through platform: XP, SERVER03, 2000).Ĭopy the code as follows: GetLocalIP Several Methods of Obtaining Client IP Using JS The following code is for all Windows NT 5.0 and above systems test Pass, give the code: In Chrome and FireFox, there are few JS scripts that directly use ActiveX to get IP and so on. Today we are working on JS( JavaScript ) After searching the internet, many of the small programs to get client IP are ineffective in the current system and browser, but they are very helpless. Friends who need it can refer to the following. This paper implements it by other methods. This article mainly introduces js JS itself does not support acquiring information such as IP address.