test.html 602 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function loadDoc() {
  6. var xhttp = new XMLHttpRequest();
  7. xhttp.onreadystatechange = function() {
  8. if (this.readyState == 4 && this.status == 200) {
  9. document.getElementById("demo").innerHTML = this.responseText;
  10. }
  11. };
  12. xhttp.open("GET", "https://publish.lesprojekt.cz/nodejs/datasets", true);
  13. //xhttp.open("GET", "http://localhost:3000/datasets", true);
  14. xhttp.send();
  15. }
  16. </script>
  17. </head>
  18. <body>
  19. <div id="demo">
  20. <h2>Let AJAX change this text</h2>
  21. <button type="button" onclick="loadDoc()">Change Content</button>
  22. </div>
  23. </body>
  24. </html>