计数器小问题?请看看

tr100 tr100 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<%--Tomato-jsp-study--%>
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>网页计数器</title>
</head>
<body>
<%if(application.getAttribute("counter")==null)
application.setAttribute("count","1");
else
application.setAttribute("count",Integer.toString(Integer.valueOf(
application.getAttribute("count").toString()).intValue()+1));%>你是第<%=application.getAttribute("count")%>位访问者
</body>
</html>
//为什么count没有反映呢?
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
tr100
Web 开发 81,108 成员 341,721 内容