JavaScript DHTML/Event onMethod/onReadyStateChange
"onReadyStateChange" Example
<html>
<head>
<script language="JavaScript">
document.onreadystatechange=function1;
function function1 () {
if (document.readyState=="complete") {
alert("The document ready state is "complete"")
}
}
</script>
</head>
<body>
<p>Body content</p>
</body>
</html>