質問編集履歴
1
ソースコードの貼り付けに失敗しておりました。申し訳ございません。
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,6 +28,8 @@
|
|
28
28
|
|
29
29
|
```HTML
|
30
30
|
|
31
|
+
<!DOCTYPE html>
|
32
|
+
|
31
33
|
<html>
|
32
34
|
|
33
35
|
<head>
|
@@ -68,13 +70,19 @@
|
|
68
70
|
|
69
71
|
<tr id="row1">
|
70
72
|
|
71
|
-
<td> 1 </td><td> id 1 </td><td id="1"> 0 </td><td
|
73
|
+
<td> 1 </td><td> id 1 </td><td id="1"> 0 </td><td "hogehoge"></td>
|
72
74
|
|
73
75
|
</tr>
|
74
76
|
|
75
77
|
<tr id="row2">
|
76
78
|
|
77
|
-
<td> 2 </td><td> id 2 </td><td id="2"> 0 </td><td "hogehoge"
|
79
|
+
<td> 2 </td><td> id 2 </td><td id="2"> 0 </td><td "hogehoge"></td>
|
80
|
+
|
81
|
+
</tr>
|
82
|
+
|
83
|
+
<tr id="row3">
|
84
|
+
|
85
|
+
<td> 3 </td><td> id 3 </td><td id="3"> 0 </td><td "hogehoge"></td>
|
78
86
|
|
79
87
|
</tr>
|
80
88
|
|
@@ -86,6 +94,10 @@
|
|
86
94
|
|
87
95
|
<hr>
|
88
96
|
|
97
|
+
<h3>TEST</h3>
|
98
|
+
|
99
|
+
<img src="./floor2.jpg"/>
|
100
|
+
|
89
101
|
<script>
|
90
102
|
|
91
103
|
var ws = new WebSocket('ws://localhost:8888/ws');
|
@@ -104,194 +116,10 @@
|
|
104
116
|
|
105
117
|
ws.onmessage = function(ev){
|
106
118
|
|
107
|
-
"index.html" 90L, 2944C
|
108
|
-
|
109
|
-
<!DOCTYPE html>
|
110
|
-
|
111
|
-
<html>
|
112
|
-
|
113
|
-
<head>
|
114
|
-
|
115
|
-
<title>tornado WebSocket example</title>
|
116
|
-
|
117
|
-
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
118
|
-
|
119
|
-
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
120
|
-
|
121
|
-
</head>
|
122
|
-
|
123
|
-
<body>
|
124
|
-
|
125
|
-
<div class="container">
|
126
|
-
|
127
|
-
<h1>tornado WebSocket example</h1>
|
128
|
-
|
129
|
-
<hr>
|
130
|
-
|
131
|
-
WebSocket status : <span id="message"></span>
|
132
|
-
|
133
|
-
<hr>
|
134
|
-
|
135
|
-
<h3>The following table shows values by using WebSocket</h3>
|
136
|
-
|
137
|
-
<div class="row">
|
138
|
-
|
139
|
-
<div class="span4">
|
140
|
-
|
141
|
-
<table class="table table-striped table-bordered table-condensed">
|
142
|
-
|
143
|
-
<tr>
|
144
|
-
|
145
|
-
<th>No.</th><th>id</th><th>value</th><th>status</th>
|
146
|
-
|
147
|
-
</tr>
|
148
|
-
|
149
|
-
<tr id="row1">
|
150
|
-
|
151
|
-
<td> 1 </td><td> id 1 </td><td id="1"> 0 </td><td "hogehoge"></td>
|
152
|
-
|
153
|
-
</tr>
|
154
|
-
|
155
|
-
<tr id="row2">
|
156
|
-
|
157
|
-
<td> 2 </td><td> id 2 </td><td id="2"> 0 </td><td "hogehoge"></td>
|
158
|
-
|
159
|
-
</tr>
|
160
|
-
|
161
|
-
<tr id="row3">
|
162
|
-
|
163
|
-
<td> 3 </td><td> id 3 </td><td id="3"> 0 </td><td "hogehoge"></td>
|
164
|
-
|
165
|
-
</tr>
|
166
|
-
|
167
|
-
</table>
|
168
|
-
|
169
|
-
</div>
|
170
|
-
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<script>
|
174
|
-
|
175
|
-
var ws = new WebSocket('ws://localhost:8888/ws');
|
176
|
-
|
177
|
-
var $message = $('#message');
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
ws.onopen = function(){
|
182
|
-
|
183
|
-
$message.attr("class", 'label label-success');
|
184
|
-
|
185
|
-
$message.text('open');
|
186
|
-
|
187
|
-
};
|
188
|
-
|
189
|
-
ws.onmessage = function(ev){
|
190
|
-
|
191
119
|
$message.attr("class", 'label label-info');
|
192
120
|
|
193
121
|
$message.hide();
|
194
122
|
|
195
|
-
};
|
196
|
-
|
197
|
-
ws.onmessage = function(ev){
|
198
|
-
|
199
|
-
$message.attr("class", 'label label-info');
|
200
|
-
|
201
|
-
$message.hide();
|
202
|
-
|
203
|
-
<!DOCTYPE html>
|
204
|
-
|
205
|
-
<html>
|
206
|
-
|
207
|
-
<head>
|
208
|
-
|
209
|
-
<title>tornado WebSocket example</title>
|
210
|
-
|
211
|
-
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
212
|
-
|
213
|
-
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
214
|
-
|
215
|
-
</head>
|
216
|
-
|
217
|
-
<body>
|
218
|
-
|
219
|
-
<div class="container">
|
220
|
-
|
221
|
-
<h1>tornado WebSocket example</h1>
|
222
|
-
|
223
|
-
<hr>
|
224
|
-
|
225
|
-
WebSocket status : <span id="message"></span>
|
226
|
-
|
227
|
-
<hr>
|
228
|
-
|
229
|
-
<h3>The following table shows values by using WebSocket</h3>
|
230
|
-
|
231
|
-
<div class="row">
|
232
|
-
|
233
|
-
<div class="span4">
|
234
|
-
|
235
|
-
<table class="table table-striped table-bordered table-condensed">
|
236
|
-
|
237
|
-
<tr>
|
238
|
-
|
239
|
-
<th>No.</th><th>id</th><th>value</th><th>status</th>
|
240
|
-
|
241
|
-
</tr>
|
242
|
-
|
243
|
-
<tr id="row1">
|
244
|
-
|
245
|
-
<td> 1 </td><td> id 1 </td><td id="1"> 0 </td><td "hogehoge"></td>
|
246
|
-
|
247
|
-
</tr>
|
248
|
-
|
249
|
-
<tr id="row2">
|
250
|
-
|
251
|
-
<td> 2 </td><td> id 2 </td><td id="2"> 0 </td><td "hogehoge"></td>
|
252
|
-
|
253
|
-
</tr>
|
254
|
-
|
255
|
-
<tr id="row3">
|
256
|
-
|
257
|
-
<td> 3 </td><td> id 3 </td><td id="3"> 0 </td><td "hogehoge"></td>
|
258
|
-
|
259
|
-
</tr>
|
260
|
-
|
261
|
-
</table>
|
262
|
-
|
263
|
-
</div>
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
<hr>
|
268
|
-
|
269
|
-
<h3>TEST</h3>
|
270
|
-
|
271
|
-
<img src="./floor2.jpg"/>
|
272
|
-
|
273
|
-
<script>
|
274
|
-
|
275
|
-
var ws = new WebSocket('ws://localhost:8888/ws');
|
276
|
-
|
277
|
-
var $message = $('#message');
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
ws.onopen = function(){
|
282
|
-
|
283
|
-
$message.attr("class", 'label label-success');
|
284
|
-
|
285
|
-
$message.text('open');
|
286
|
-
|
287
|
-
};
|
288
|
-
|
289
|
-
ws.onmessage = function(ev){
|
290
|
-
|
291
|
-
$message.attr("class", 'label label-info');
|
292
|
-
|
293
|
-
$message.hide();
|
294
|
-
|
295
123
|
$message.fadeIn("slow");
|
296
124
|
|
297
125
|
$message.text('recieved message');
|