Browse Source

online number

schtonn 2 years ago
parent
commit
72370f1a44
2 changed files with 5 additions and 1 deletions
  1. 4 1
      chess/index.html
  2. 1 0
      js/chess.js

+ 4 - 1
chess/index.html

@@ -189,6 +189,7 @@
             border-radius: 2px;
             background: rgb(215 215 215 / 50%);
         }
+
         input:hover {
             outline-style: none;
             text-shadow: rgb(85, 85, 85) 3px 2px 4px;
@@ -227,7 +228,9 @@
         <div id="game" class="center-block">
             <span class="black pointer"></span>
         </div>
-        <div style="display:inline-block">在线人数:<p style="display: inline-block" class="curnum">0</p></div>
+        <div style="display:inline-block">在线人数:<il id="messageServer"></il>
+        </div>
+    </div>
     </div>
     <script src="../js/chess.js"></script>
 </body>

+ 1 - 0
js/chess.js

@@ -73,6 +73,7 @@ function updateMessages() {
     if (messages[3]) $('.message4').addClass("red");
     else $('.message4').removeClass("red");
     $("#messageText")[0].value = messages[4];
+    $("#messageServer")[0].innerHTML = messages[5];    
 }
 
 var timer, st = 1;