HTML DOM readyStateProperty

Document 对象参考手册Document Object

Definition and Usage

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

This property returns the following values:

  • uninitialized - Not yet started loading
  • loading - Loading
  • interactive - Has loaded, the document and the user can start interacting
  • complete - Loading complete

Syntax

document.readyState


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the readyState property


Example

Example

Return the loading state of the current document:

<html>
<body>

Loading status:
<script>
document.write(document.readyState);
</script>

</body>
</html>

Try it yourself »


Document 对象参考手册Document Object Other Extensions