test.html 744 B

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