pysyft 博客看完

This commit is contained in:
Estom
2021-05-09 16:21:02 +08:00
parent f55d48db3f
commit 4df1fa4d7c
13 changed files with 288 additions and 163 deletions

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>WebSocket Test</title>
</head>
<body>
<script>
var wsObj = new WebSocket("ws://127.0.0.1:5678"); //建立连接
wsObj.onopen = function(){ //发送请求
alert("open");
wsObj.send("admin:123456");
};
wsObj.onmessage = function(ev){ //获取后端响应
alert(ev.data);
};
wsObj.onclose = function(ev){
alert("close");
};
wsObj.onerror = function(ev){
alert("error");
};
</script>
</body>
</html>