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

📄 onechat.jsp

📁 这是一个极其好的聊天系统(java+jsp+servlet)
💻 JSP
字号:
<%@ page errorPage="ErrorPage.jsp" %>
<%@ page contentType="text/html;charset=gb2312" %>
<jsp:useBean id="thisUser" scope="session" class="chatroom.oneUser" />
<jsp:useBean id="thischatroom" scope="application" class="chatroom.ChatRoom" />
<%
int intchatroom=Integer.parseInt(thisUser.getUserPosion());
%>
<HTML>
   <HEAD>
      <meta http-equiv="Refresh" content="<%=thisUser.getRetimeChat(intchatroom)%>;URL=/mytest/jsp/onechat.jsp">
      <script language=javascript>
      var timeRun=false;
      var timeID;
      function chatScroll(){
      this.scroll(0,10000);
      if(timeRun) clearTimeout(timeID);
      timeID=setTimeout('chatScroll()',100);
      timeRun=true;
      }function scrollStop(){
      if(timeRun) {clearTimeout(timeID); timeRun=false;}
      else chatScroll();
      }
      function rop(){
      setTimeout('rop()',10000);
      }
      chatScroll();
      rop();
      </script>
   </HEAD>
   <BODY>
<%
  if (thisUser.getUserName() != null)
    {String UserId=thisUser.getUserId();
     String allSpeaking=thischatroom.returnAllSpeaking(intchatroom,UserId);
     out.print(allSpeaking);
    }
    else out.print("尚未登录,进入<a href='/mytest/jsp/login.jsp'>用户登录</a>");
%>
   </BODY>
</HTML>

⌨️ 快捷键说明

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