Commit 7040fc67 authored by 冯景珉's avatar 冯景珉

Updates 框架功能描述/websocket.md

Auto commit by GitBook Editor
parent 3ded3cb0
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
``` ```
function initWebSocket() { function initWebSocket() {
socket = new SockJS(contextPath + '/websocket'); socket = new SockJS(contextPath + '/websocket');//创建SockJS对象,打开websocket连接
socket.onmessage = function (event) { socket.onmessage = function (event) {
var data = $.parseJSON(event.data);//获取推送到前端的消息 var data = $.parseJSON(event.data);//获取推送到前端的消息
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment