12345678910111213141516171819202122232425262728293031 |
- <%--
- Created by IntelliJ IDEA.
- User: x'b'w
- Date: 2021/5/21
- Time: 19:36
- To change this template use File | Settings | File Templates.
- --%>
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <html>
- <head>
- <title>例子1的练习</title>
- </head>
- <body>
- <h1>浏览人数</h1>
- <%
- Integer cou = (Integer) session.getAttribute("cou");
- if (cou == null){
- cou = 1;
- session.setAttribute("cou",cou);
- }else {
- cou ++;
- session.setAttribute("cou",cou);
- }
- %>
- 你是第<%=
- cou
- %>位访客
- </body>
- </html>
|