XMLHttpRequest
http://www.ruanyifeng.com/blog/2012/09/xmlhttprequest_level_2.html
老版本 Level 1
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script> var http=new XMLHttpRequest(); http.open('get','http://localhost:60479/weatherforecast',true) http.send() http.onreadystatechange=function(){ if ( http.readyState == 4 && http.status == 200 ) { console.log( http.responseText ); } else { console.log( http.statusText ); } } </script> </body> </html>