<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->コンソールでは、次のように表示されます。
The state of the document: interactive
The state of the document: complete
The document has been loaded.
質問:
なぜFirefoxでスクリプトを実行するたびに、とだけが表示interactive
されるのcomplete
ですか? 他の州はどうですか: uninitialized
, loading
...