From 1b8c682682e391adaa4b2e054a7f037dc3e8e37e Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 06:26:14 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20test?= =?UTF-8?q?.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test.html b/test.html index fc88a03..b9da0ab 100644 --- a/test.html +++ b/test.html @@ -14,12 +14,14 @@ ws.onopen = function () { console.log("websocket engage"); }; + ws.onclose = function () { + console.log("connection closed"); + }; function refresh() { - ws.send("next")= function(evt){;}; + ws.send("next"); } - $(document).ready(refresh()) - setInterval('refresh()', 2000); + setInterval(refresh(), 2000);