Javascript examples for DOM:Document readyState
The readyState property returns the loading status of the current document.
This property is read-only.
A String, representing the status of the current document.One of five values:
The following code shows how to get the loading status of the current document:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">display the loading status of the current document</button> <p id="demo"></p> <script> function myFunction() {// www . jav a2 s. c o m var x = document.readyState; document.getElementById("demo").innerHTML = x; } </script> </body> </html>