xhr_access.html 308 B

12345678910111213141516
  1. <html>
  2. <head>
  3. <script>
  4. var xhr = new XMLHttpRequest();
  5. xhr.open("GET", "hello_world.html", false);
  6. try {
  7. xhr.send();
  8. document.write(xhr.responseText);
  9. } catch (e) {
  10. document.title = "Exception";
  11. }
  12. </script>
  13. </head>
  14. <body>
  15. </body>
  16. </html>