39 wiersze
907 B
HTML
39 wiersze
907 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>${context.getContextName()}</title>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
<meta name="Author" content="${context.getContextName()}" />
|
|
<script>
|
|
var isClose = true;
|
|
var ws = new WebSocket("ws://127.0.0.1");
|
|
ws.onopen = function()
|
|
{
|
|
function send()
|
|
{
|
|
console.log("中文");
|
|
ws.send("中文");
|
|
};
|
|
|
|
console.log("open");
|
|
isClose = false;
|
|
ws.send("开始...");
|
|
F.timer(1000, 10, null, send);
|
|
};
|
|
ws.onmessage = function(e) { console.log(e.data); };
|
|
ws.onclose = function(e) { console.log("WebSocketClosed!"); };
|
|
ws.onerror = function(e) { console.log("WebSocketError!"); };
|
|
|
|
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
ddffdds在在在
|
|
${abc}
|
|
</body>
|
|
</html> |