You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
418 B

9 years ago
9 years ago
  1. <!DOCTYPE html>
  2. <head>
  3. <title>Ajax test</title>
  4. </head>
  5. <body>
  6. <h1>README</h1>
  7. <h2>loaded in the "Ajax" style</h2>
  8. <pre id="readme"></pre>
  9. <script>
  10. var $ = document.querySelector.bind(document);
  11. var req = new XMLHttpRequest();
  12. req.open("get", "http://localhost:8000/big-file.txt", true);
  13. req.onload = function(){
  14. $("#readme").textContent = this.responseText;
  15. }
  16. req.send()
  17. </script>
  18. </body>