求一个网站计数器代码,要通用的HTML代码(分数不是问题,在线等)
答案:2 悬赏:80
解决时间 2021-01-13 17:00
- 提问者网友:咪咪
- 2021-01-13 04:31
求一个网站计数器代码,要通用的HTML代码(分数不是问题,在线等)
最佳答案
- 二级知识专家网友:神鬼未生
- 2021-01-13 06:06
这个用JSP的做法是: <%@ page language="java" import="java.util.*" pageEncoding="GBK"%> <% int count = 0; if(application.getAttribute("count") == null) { application.setAttribute("count",new Integer(count)); } else { count =Integer.parseInt(application.getAttribute("count").toString()); count ++; application.setAttribute("count", new Integer(count)); }%>
共有<=count %>人访问过该网站