-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path13-4.html
More file actions
37 lines (34 loc) · 854 Bytes
/
13-4.html
File metadata and controls
37 lines (34 loc) · 854 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>
hi templates
</title>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
</head>
<body>
<div>
div value
</div>
hi this is hi templates <br/>
data from {{value}} <br/>
{{no}}
<button type="button">
Click
</button>
<br/>
<span id=btn1>no data</span>
<span id=btn2>no data</span>
</body>
</html>
<script type="text/javascript">
setInterval(update_value, 500) ;
function update_value() {
$.getJSON("/button", function(data) {
console.log(data) ;
// $('#buttonValue').text(data.value) ;
$('#btn1').text(data.btn1) ;
$('#btn2').text(data.btn2) ;
}) ;
}
</script>