Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
- </head>
- <body>
- <h1> Teplomer </h1>
- <div class="vystup"></div>
- <script>
- x();
- function x()
- {
- $.getJSON('http://192.168.21.222/data.json', function(data)
- {
- var text = `1 teplota: ${data.cidla.Teplota1} °C<br>
- 2 teplota: ${data.cidla.Teplota2} °C<br>
- Vlhkost: ${data.cidla.Vlhkost} <br>
- Venkovni teplota: ${data.cidla.Venkovni} °C<br>`
- $(".vystup").html(text);
- })
- setTimeout(x, 2000);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement