如何通过JS得到访问者的IP

2024-12-31 05:50:13
推荐回答(1个)
回答1:

<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>