<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