<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->console 中,它显示:
The state of the document: interactive
The state of the document: complete
The document has been loaded.
问题:
为什么每次我在Firefox中运行脚本时,它只显示interactive
和complete
?其他州怎么样:uninitialized
,loading
...