First version
[ampy.git] / html / index.php
1 <!DOCTYPE html>
2 <meta charset="UTF-8">
3 <script src='/javascript/jquery/jquery.js'></script>
4 <script>
5 function refresh_power() {
6         $.ajax({
7                 url : 'currentjson.php',
8                 success : function(result) {
9                         document.getElementById('currentpower').innerHTML = result['watts'];
10                 },
11                 complete : function() {
12                         setTimeout(refresh_power, 1000);
13                 }
14         });
15 }
16 </script>
17
18 Puissance instannĂ©e: <span id=currentpower>unknown</span> watts<br>
19 <script>refresh_power();</script>
20
21
22 <img src="graph.php">