<head>
<script type="text/javascript">
document.onreadystatechange = WaitForComplete;
function WaitForComplete() {
console.log ("The state of the document: " + document.readyState);
}
function OnLoad() {
console.log ("The document has been loaded.");
}
</script>
</head>
<body onload="OnLoad()">
</body>
В firefox-> консоли, она показывает:пытаясь понять некоторые коды, связанные с readyState в JS
The state of the document: interactive
The state of the document: complete
The document has been loaded.
Вопрос:
почему каждый раз, когда я запускаю скрипт в Firefox, это только показывает, interactive
и complete
? как насчет других стран: uninitialized
, loading
...