</head>
<body>
<%
int i = 0;
Object number = application.getAttribute("num");
if(number == null){
i = 1;
application.setAttribute("num",i);
}else{
i = Integer.parseInt(application.getAttribute("num").toString());//由对象转换成字符串,再转换成整型
i++;
application.setAttribute("num",i);
}
%>
欢迎来到LCS的网站:
<br/><br/>
您好!您是第<%=i %>位登录该网站的用户
</body>
时间: 2024-10-13 14:54:49