This article describes how to use XmlHttp to asynchronously obtain website data. For more information, see
Code case study of XmlHttp asynchronous acquisition of website data
Script var oDivvar xh function getXML () {oDiv = document. all. moDiv. innerHTML = "loading column data. please wait ....... "oDiv. style. display = "" xh = new ActiveXObject ("Microsoft. XMLHTTP ") xh. onreadystatechange = getReadyxh. open ("GET",. value, true) xh. send ()} function getReady () {if (xh. readyState = 4) {if (xh. status = 200) {oDiv. innerHTML = "finished"} else {oDiv. innerHTML = "Sorry, data loading failed. Cause: "+ xh. statusText }}} script
Xmlhttp asynchronous example:
URL:
The above is the detailed analysis of the code case for XmlHttp to asynchronously retrieve website data. For more information, see other related articles in the first PHP community!