⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 网络计数器防刷新的
💻 JSP
字号:
<%@ page contentType="text/html;charset=GB2312" %>

<HTML><BODY>

<%!

   String show(Integer counter)

   {

       String S, image;

        image = "";

       S = counter.toString() ;

       for(int i = 0; i<S.length(); i++)

       {

            image = image + "<IMG SRC=images/" + S.charAt(i) + ".gif>";
            

       }

       return image;

    }

%>

<%

    Integer number=(Integer)application.getAttribute("Count");

    if(number==null)    { 

         number=new Integer(1);

         application.setAttribute("Count",number); 

    }

    else   { 

         number=new Integer(number.intValue() + 1);

         application.setAttribute("Count",number); 

    }

    %>

您是本站第<%=show((Integer)application.getAttribute("Count"))%>

个访问本站的客户。

</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -