1 Star 3 Fork 1

yifang/WebSocketBaseTestTool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.html 4.74 KB
一键复制 编辑 原始数据 按行查看 历史
yifang 提交于 2020-04-17 20:18 . 初始化 第一次提交
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WebSocket Test</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="row">
<div class="col-xs-6">
<div class="input-group">
<span class="input-group-addon">WS HOST</span>
<input type="text" id="wsHost" value="ws://8.129.219.65:9503" class="form-control" placeholder="ws://127.0.0.1:8080">
</div>
</div>
<div class="col-xs-6 controllerArea" style="display: none;">
<div class="btn-group" role="group" aria-label="...">
<button type="button" id="linkSocket" class="btn btn-success">连接</button>
<button type="button" id="closeSocket" class="btn btn-danger">断开</button>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="row">
<div class="col-xs-12">
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#home" aria-controls="home" role="tab" data-toggle="tab">发送内容</a>
</li>
<li role="presentation">
<a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">心跳设置</a>
</li>
<!-- <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li> -->
</ul>
<!-- Tab panes -->
<div class="tab-content" style="padding: 10px;">
<div role="tabpanel" class="tab-pane active" id="home">
<textarea name="" id="sendContent" cols="53" rows="10"></textarea>
<button type="button" id="sendMessage" class="btn btn-primary" disabled='disabled'>发送消息</button>
</div>
<div role="tabpanel" style="padding: 10px;" class="tab-pane" id="profile">
<div class="row">
<div class="col-xs-12">
<p>需要断开后才能更改</p>
<div class="input-group">
<span class="input-group-addon">心跳(S)</span>
<input type="number" id="heartBeatSecond" class="form-control" placeholder="默认无心跳">
</div>
<div role="tabpanel" class="tab-pane active" id="home">
<textarea name="" id="sendHertContent" cols="53" rows="10"></textarea>
<button type="button" id="sendHertMessage" class="btn btn-primary">设置心跳</button>
</div>
</div>
</div>
</div>
<!-- <div role="tabpanel" class="tab-pane" id="messages">...</div> -->
</div>
</div>
</div>
</div>
<div class="row">
</div>
</div>
<div class="col-xs-6">
<div class="panel panel-default">
<div class="panel-heading" style="position: relative;height: 50px;">
<h3 class="panel-title" style="display: inline-block;">消息通知</h3>
<button style="position: absolute;right: 10px;" type="button" id="clearMessage" class="btn btn-primary">清除</button>
</div>
<div class="panel-body messageNot">
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>if (typeof module === 'object') {window.jQuery = window.$ = module.exports;};</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script src="./js/index.js"></script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/shuinanxun/WebSocketBaseTestTool.git
git@gitee.com:shuinanxun/WebSocketBaseTestTool.git
shuinanxun
WebSocketBaseTestTool
WebSocketBaseTestTool
master

搜索帮助