<%@ page contentType="text/html" pageEncoding="gbk"%>
<html>
<head>
<title></title>
</head>
<body>
<%!
int count=0;
%>
<%
response.setHeader("refresh","5");
%>
已经刷新了<%=count++%>次
</body>
<html>
<head>
<title></title>
</head>
<body>
<%!
int count=0;
%>
<%
response.setHeader("refresh","5");
%>
已经刷新了<%=count++%>次
</body>
</html>
用此代码可以实现页面的自动刷新,每隔5秒钟。