【JS】Intermediate3:AJAX

1.load new content into a page without a full reload

XML HTTP Request (XHR) To retrieve new content for a page

AJAX standing for Asynchronous JavaScript and XML.

2.XML HTTP Request

create a new XMLHttpRequest request

specify a callback function

specify a callback function(specify a callback function, URL to fetch from, a boolean specifying whether the request is asynchronous)

 a boolean specifying whether the request is asynchronous

3.Using an XMLHttpRequest you can load HTML, JSON, XML and plain text over HTTP and HTTPS, and it also supports other protocols like FTP and file

原文地址:https://www.cnblogs.com/yzhen/p/3660351.html