html status of the current document

<script type="text/javascript">
document.onreadystatechange = loadingChange;//This method is executed when the page loading state changes.  
function loadingChange(){   
    if(document.readyState == "complete"){ //Enter when the page loading state is completely finished   
        document.getElementById("loading").style.display="none";
    }   
}
</script>

Definition and Usage

The readyState property returns the state of the current document (loading...).

This property returns the following values:

  • uninitialized - has not started loading
  • loading - loading
  • interactive - loaded, the document and the user can start interacting
  • complete - loading is complete

Guess you like

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