Async related learning

Async port. Asynchronous serial port, mainly used for Modem or Modem pool connection. It is mainly used to realize the remote computer dialing into the network through the public telephone, the data rate is not high, and the synchronization between communication devices is not required.

The async attribute specifies whether the download of the XML file should be processed synchronously.

True means that the load() method can return control to the calling program before the download is complete.

False means that the download must complete before the calling program can take back control.

Example

function loadXMLDoc(dname)

{

var xmlDoc;

// code for IE

if (window.ActiveXObject)

{

xmlDoc=new ActiveXObject("Microsoft.XMLDOM");

}

// code for Mozilla, Firefox, Opera, etc.

else if (document.implementation && document.implementation.createDocument)

{

xmlDoc=document.implementation.createDocument("","",null);

}

else

{

alert('Your browser cannot handle this script');

}

xmlDoc.async=false;

xmlDoc.load(dname);

return(xmlDoc);

}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324605692&siteId=291194637