我想在javascript中获得我的机器的Ip地址,这在我的html页面中有进一步的参考。我有参考所有建议的链接,但我没有得到任何答复。我不想使用任何链接来获取IP,所以我在javascript中尝试了下面的代码行
var ip = '<%=request.getRemoteAddr();%>';或
var ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
var ip = Request.UserHostAddress.ToString();但不要得到结果。
请帮助我得到解决方案,我想把这个javascript包含在我的html页面,我不想使用任何链接来获取IP。
All the links I have gone through gives the external links to get the IP address and I do not want to use any external link to get the IP.
https://stackoverflow.com/questions/29959708
复制相似问题