java:
class="java">// 192.168.1.103 log.debug(request.getRemoteHost()); // 192.168.1.103 log.debug(request.getRemoteAddr()); // 52721 log.debug(request.getRemotePort()); // null log.debug(request.getRemoteUser()); // 192.168.1.103:8080 log.debug(request.getHeader("Host")); // 192.168.1.103 log.debug(request.getServerName());
?JS:
//获取域名 host = window.location.host; host2=document.domain; //获取页面完整地址 url = window.location.href;
?