From 255e68fbfab3796a63c5b54ea3b8cc12f5115e72 Mon Sep 17 00:00:00 2001 From: Justine Date: Sat, 17 Jun 2017 16:00:41 +0200 Subject: [PATCH] Ajout lecture mode suite à oubli précédent --- Application_raspberryJustine/pageHTML/mode.html | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Application_raspberryJustine/pageHTML/mode.html b/Application_raspberryJustine/pageHTML/mode.html index 0d75260..4d3a3b3 100644 --- a/Application_raspberryJustine/pageHTML/mode.html +++ b/Application_raspberryJustine/pageHTML/mode.html @@ -12,17 +12,10 @@ websocket.onerror=function(){ $('h1').css('color','red');}; websocket.onopen=function(){ $('h1').css('color','green');}; - - webscket.onmessage=function(message){ - console.log(message.data); - $('#messages').append($('

',{ text: message.data})); - }; - - function mode(){ - var message=$('#myonoffswitch').checked; - websocket.send(message); - + function sendMessage(){ + websocket.send($('#onoffswitch').is(':checked')); } + @@ -35,6 +28,8 @@ + +

Retour

-- libgit2 0.21.2