-
Notifications
You must be signed in to change notification settings - Fork 0
/
j2.html
49 lines (35 loc) · 960 Bytes
/
j2.html
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
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Температура в Витебске</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="css/j2.css">
<meta charset="UTF-8">
<!--<meta http-equiv="Refresh" content="15">-->
</head>
<body>
<script>
$.getJSON('https://dweet.io/get/latest/dweet/for/olbo_temp22', function(data) {
var text = `${JSON.stringify(data.with)}`
var s1 = text.indexOf('payload":');
text = text.substring(s1+9);
s1 = text.indexOf('}');
text = text.substring(0,s1);
$(".temperature").html(text);
});
</script>
<div class="box">
<div class="box_small">
</div>
<div class="string1">
Температура в Витебске
</div>
<div class="box_small">
</div>
<div class="temperature"></div>
<div class="string3">
°C
</div>
</div>
</body>
</html>