test.html 776 B

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="icon" href="data:,">
  5. <meta charset="utf-8">
  6. </head>
  7. <body style="font-family: arial">
  8. testschrift
  9. <div id="value"></div>
  10. </html>
  11. <script type="text/javascript" src="./gethost.js"></script>
  12. <script type="text/javascript">
  13. var basepath = "http://192.168.178.22";
  14. function testinit(){
  15. basepath = getbasepath();
  16. url = basepath + '/wasserzaehler.html?all=true';
  17. var xhttp = new XMLHttpRequest();
  18. xhttp.onreadystatechange = function() {
  19. if (this.readyState == 4 && this.status == 200) {
  20. // Typical action to be performed when the document is ready:
  21. document.getElementById("value").innerHTML = xhttp.responseText;
  22. }
  23. };
  24. xhttp.open("GET", url, true);
  25. xhttp.send();
  26. }
  27. testinit();
  28. </script>
  29. </body>