Blame view

pageHTML/intensite.html 1.04 KB
3fda8b5d   Justine Senellart   voila
1
2
3
4
5
6
  <!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <title>Changement d'intensité</title>
  
5f7d5a55   Claire Vandamme   transmission des ...
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  <script src="jquery.js"></script>
      <script type= "text/javascript">
        window.Websocket = (window.Websocket || window.MozWebSocket);
        var websocket = new WebSocket('ws://192.168.43.222:9000, 'myprotocol');};
        websocket.onerror=function(){ $('h1').css('color','red');};
        websocket.onopen=function(){ $('h1').css('color','green');};
        
        
        webscket.onmessage=function(message){
        console.log(message.data);
        $('#messages').append($('<p>',{ text: message.data}));
  	};
  
  	function intensite(){
  	var message=$('#slider').value();
  	websocket.send(message);
  
  	}
      </script>
      
3fda8b5d   Justine Senellart   voila
27
28
29
30
31
32
33
34
35
36
37
38
  </head>
  <body>
  <h1>Changement d'intensite de votre veilleuse connectée</h1>
  <div id = "slider">
      <input type ="range" min ="0" max="255" value ="100" onchange = "rangevalue.value=value">
      <span class = "highlight"></span>
      <output id="rangevalue">50</output>
  </div>
  
  <h3><a href="Menu.html">Retour</a></h3>
  </body>
  </html>