abc.htm 907 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>${context.getContextName()}</title>
  5. <meta charset="UTF-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  8. <meta name="viewport" content="width=device-width,initial-scale=1"/>
  9. <meta name="Author" content="${context.getContextName()}" />
  10. <script>
  11. var isClose = true;
  12. var ws = new WebSocket("ws://127.0.0.1");
  13. ws.onopen = function()
  14. {
  15. function send()
  16. {
  17. console.log("中文");
  18. ws.send("中文");
  19. };
  20. console.log("open");
  21. isClose = false;
  22. ws.send("开始...");
  23. F.timer(1000, 10, null, send);
  24. };
  25. ws.onmessage = function(e) { console.log(e.data); };
  26. ws.onclose = function(e) { console.log("WebSocketClosed!"); };
  27. ws.onerror = function(e) { console.log("WebSocketError!"); };
  28. </script>
  29. </head>
  30. <body>
  31. ddffdds在在在
  32. ${abc}
  33. </body>
  34. </html>