src/main/webapp/view/newUnorganizedMap.jsp
@@ -19,7 +19,7 @@ #box { width: 300px; height: 400px; top: 220px; top: 30px; right: 30px; position: absolute; z-index: 1; @@ -157,10 +157,17 @@ moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); }*/ }; window.onbeforeunload=function(e){ e = window.event||e; e.returnValue=("确定离开当前页面吗?"); ws.onclose = function () { }; alert(1) } //关闭事件 ws.onclose = function () { }; /*ws.onclose = function () { };*/ //发生了错误事件 ws.onerror = function () { };