Commit 29a2b17fca60d707b099a9a6d3540ce58f0d7309
1 parent
926848d0
suppression de testWebsockets.html
Showing
1 changed file
with
0 additions
and
32 deletions
Show diff stats
appWeb/testWebsockets.html deleted
... | ... | @@ -1,32 +0,0 @@ |
1 | -<!DOCTYPE html> | |
2 | -<html> | |
3 | - <head> | |
4 | - <meta charset="utf-8"> | |
5 | - <script src="js/jquery-3.2.1.min.js"></script> | |
6 | - <script type="text/javascript"> | |
7 | -window.WebSocket=(window.WebSocket||window.MozWebSocket); | |
8 | - | |
9 | -var websocket=new WebSocket('ws://192.168.1.111:9000','myprotocol'); | |
10 | - | |
11 | -websocket.onopen=function(){ $('h1').css('color','green'); }; | |
12 | - | |
13 | -websocket.onerror=function(){ $('h1').css('color','red'); }; | |
14 | - | |
15 | -websocket.onmessage=function(message){ | |
16 | -console.log(message.data); | |
17 | -$('#messages').append($('<p>',{ text: message.data })); | |
18 | -}; | |
19 | - | |
20 | -function sendMessage(){ | |
21 | -websocket.send($('#message').val()); | |
22 | -$('#message').val(''); | |
23 | -} | |
24 | - </script> | |
25 | - </head> | |
26 | - <body> | |
27 | - <h1>WebSockets test</h1> | |
28 | - <input type="text" id="message"/> | |
29 | - <button onclick="sendMessage();">Send</button> | |
30 | - <div id="messages"></div> | |
31 | - </body> | |
32 | -</html> |