请思路,请方法,像新浪这样的效果
http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js
<script language="javascript" type="text/javascript" src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js
"></script>
在线等解答
直接包含js文件进去,然后取到js输出的直
不知道正确吧,这样不行,请指点
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <script type="text/javascript"> <!-- var ip = "<%=request.getRemoteAddr()%>"; //alert("<%=request.getRemoteAddr()%>"); function s(){ return "<%=request.getRemoteAddr()%>"; } //--> </script>