-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
64 lines (58 loc) · 1.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="ch" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
<title>梭哈</title>
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" rel="stylesheet">
</head>
<body>
<div class="container-lg" id="basic">
<h1>梭哈</h1>
<form class="" id="userForm">
<div class="mb-3">
<label class="form-label" for="nickname">输入昵称:</label>
<input class="form-control" id="nickname" required="required" type="text">
</div>
<div class="mb-3 ">
<label class="form-label" for="roomInput">输入房间号:</label>
<input class="form-control" disabled="disabled" id="roomInput" type="text" value="110"/>
</div>
<div class="mb-3 ">
<button class="btn btn-primary" type="submit">加入房间</button>
</div>
</form>
</div>
<div class="container-xxl" id="gameContent" style="display: none;">
<!-- 游戏内容展示在这里 -->
<div>
<h3><span class="badge bg-secondary" id="userName"></span></h3>
</div>
<div id="dice"></div>
<button class="btn btn-danger" id="rollBtn" onclick="rollDice()">掷骰子</button>
<div class="container-xxl">
<h3><span class="badge bg-secondary" id="room"></span></h3>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">昵称</th>
<th scope="col">当前骰子</th>
<th scope="col">是否被淘汰</th>
</tr>
</thead>
<tbody id="tbody">
<tr>
<th scope="row">1</th>
<td>Default</td>
<td>Default</td>
<td>Default</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/socket.io/4.6.1/socket.io.js"></script>
<script src="/js/script.js"></script>
</body>
</html>