XMLHTTP. Open (method, URL, bool;
Method: indicates the HTTP request method. There are five methods: Get. Post. Head. Put. Delete. The most common ones are get and post.
URL: The data address. If it is a local file, specify a specific path (for example, extract XML file data); if it is located on another website,
The complete URL of the website.
Bool: Indicates whether to use Asynchronous retrieval. True indicates asynchronous, and false indicates synchronous.
The followingCodeIs a statement that uses an Asynchronous Method to load Baidu website content;
XMLHTTP. Open ("get", "http://www.baidu.com", true );
The following code loads the content of the local data. xml file asynchronously;
XMLHTTP. Open ("get", "data. xml", true );
---------------------
There are 5 status changes in the asynchronous invocation server status.
0 not initialized
1 Initialization
2 send data
3. Data is being transferred
4. asynchronous call completed
---------------------------