wschat-ng/public/index.html
szdytom af9113fab9
[feature] improve frontend
use my own prompt instead of the default one
2021-03-25 16:49:18 +08:00

37 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>WebSocket Chat Room</title>
<link rel="stylesheet" type="text/css" href="./style.css" />
</head>
<body>
<div id="message"></div>
<textarea id="send" placeholder="Say something or run a command..." spellcheck="false"></textarea>
<div class="top-box">
<button class="send-button" onclick="clear_message()">Clear</button>
<p><input id="scroll-option" type="checkbox" checked /> Enable auto scroll</p>
<p>Version: WS_2.0</p>
</div>
<div class="bottom-box">
<span class="note">Press Ctrl + Enter to send </span>
<button class="send-button" onclick="send()">Send</button>
</div>
<div id="prompt-box" hidden>
<div id="prompt-box-title">
<soan id="prompt-box-title-text"></soan>
</div>
<div id="prompt-box-content">
<input type="text" id="prompt-data" />
<input type="button" value="OK" id="comfirm-prompt" />
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/socket.io-client@4.0.0/dist/socket.io.min.js"></script>
<script src="./asset/jquery.js"></script>
<script src="./script.js"></script>
</body>
</html>