一個簡單的網站計數器方法: ---------------------------------------------------------------- <body> <%Integer count = (Integer)application.getAttribute("count"); if(count==null){ count=1; }else{ count++; } application.setAttribute("count",count); %> <p>歡迎訪問,您是第<%= count %>個訪問者</p> </body>
---------------------------------------------------------------