網站計數器

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

---------------------------------------------------------------


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章