代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="zh">
<head>
<title>Socket.D-JS-WS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 " />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
<script src="js/socket.d.js"></script>
<script src="js/main.js"></script>
<style>
body{max-width: 900px; margin: auto;}
table th { text-align: right; }
table input,textarea { width: 500px; margin-left: 10px; margin-right: 10px; }
table textarea { resize: none; }
</style>
<script>
</script>
</head>
<body>
<main>
<table>
<tr>
<td width="100"></td>
<td width="500" align="center"><h2>
socket.d js demo
</h2></td>
</tr>
</table>
<hr />
<table>
<tr>
<th width="100px">ServerUrl:</th>
<td><input type="text" id="serverUrl" value="sd:ws://127.0.0.1:8602/?u=a&p=2"/></td>
<td><button id="openBtn">连接</button></td>
</tr>
<tr>
<th>Input:</th>
<td><input type="text" id="input" value="hello"/></td>
<td><button id="send">发送</button>
<button id="sendAndRequest">发送并请求</button>
<button id="sendAndSubscribe">发送并订阅</button>
</td>
</tr>
<tr>
<th></th>
<td></td>
<td><button id="push">接收推送</button>
<button id="unpush">取消推送</button></td>
</tr>
<tr>
<th></th>
<td><input type="file" id="file"></td>
<td><button id="uploadFile">上传文件</button>
<button id="downloadFile">下载文件</button>
</td>
</tr>
<tr>
<th></th>
<td></td>
<td><button id="uploadData">提交大文本块10M</button>
</td>
</tr>
<tr>
<th>Message:</th>
<td><textarea id="message" rows="15" cols="20" readonly></textarea></td>
<td></td>
</tr>
</table>
</main>
</body>
</main>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。