English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM readyState attribute

HTML DOM Document Object

readyStateRead-only property describes the loading status of the document.

When the value of this property changes, it will bedocumentdocumentTriggered on the objectEvent.

Syntax:

document.readyState
var x = document.readyState;
Test to see‹/›

Browser Compatibility

All browsers fully support the readyState property:

Property
readyStateYesYesYesYesYes

Technical Details

Return value:A string representing the current state of the document.
The document's readyState can be one of the following:
  • uninitialized (uninitialized) -The document has not started loading

  • loading (loading) -The document is still loading

  • loaded (loaded) -The document has been loaded

  • interactive (interactive) -The document has been loaded enough, and the user can interact with it

  • complete (completed) -The document and all sub-resources have been completely loaded. Status indicatorloadAn event is about to trigger.

DOM Version:DOM Level3

HTML DOM Document Object