forked from jolth/Report-GPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.bk1
42 lines (34 loc) · 844 Bytes
/
index.html.bk1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>Report GPS</title>
<script>
var READY_STATE_UNINITIALIZED = 0;
var READY_STATE_LOADING = 1;
var READY_STATE_LOADED = 2;
var READY_STATE_INTERACTIVE = 3;
var READY_STATE_COMPLETE = 4;
var p_http;
function show(){
p_http = new XMLHttpRequest();
p_http.onreadystatechange = imp;
setInterval( function () {
p_http.open('GET', '/gps.log', true);
p_http.send(null);
}, 1000);
function imp(){
if(p_http.readyState == READY_STATE_COMPLETE){
if(p_http.status == 200){
document.getElementById('salida').innerHTML = p_http.responseText;
}
}
}
}
window.onload = show;
</script>
</head>
<body>
<pre id="salida">
</pre>
</body>
</html>