
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<html> |
<head> |
<title>My JSP '4-2.jsp' starting page</title> |
<meta http-equiv="pragma" content="no-cache"> |
<meta http-equiv="cache-control" content="no-cache"> |
<meta http-equiv="expires" content="0"> |
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> |
<meta http-equiv="description" content="This is my page"> |
<!-- |
<link rel="stylesheet" type="text/css" href="styles.css"> |
--> |
</head> |
<body> |
<%-- session.setAttribute("num", 1); %> |
<%Object num = session.getAttribute("num"); |
String snum = num.toString(); |
int inum = Integer.parseInt(snum); |
%> |
您是第 <%out.print(session.getAttribute("num")); %> 位登录者。 |
|
<%inum++; --%> |
<%!int num = 1;%> |
<% |
if (session.isNew()) { |
num++; |
} |
%> |
<center> |
您是第 |
<%=num%>位访问该页的游客!! |
</center> |
</body> |
</html> |




初级程序员
by: 云代码会员 发表于:2019-06-17 08:50:30 顶(0) | 踩(0) 回复
??
回复评论