test.html 594 B

123456789101112131415161718192021222324
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wb="http://open.weibo.com/wb" style="overflow: hidden;">
  3. <head>
  4. <script>
  5. var xhr = new XMLHttpRequest();
  6. xhr.open("GET", "http://127.0.0.1:1473", true);
  7. xhr.setRequestHeader("Connection", "keep-alive");
  8. xhr.onreadystatechange = function () {
  9. if (xhr.readyState == e && xhr.status == 200) {
  10. //var data = JSON.parse(xhr.responseText);
  11. console.log(data);
  12. }
  13. }
  14. </script>
  15. </head>
  16. <body>
  17. </body>
  18. </html>