js判断页面是否加载完毕
用 document.readyState == "complete" 判断页面是否加载完成。
document.onreadystatechange = function(){
if(document.readyState=="complete")
{
alert('加载完毕');
}
}
- var leftDocument=window.parent.frames("leftFrame").document;
- if(leftDocument.readyState == 'loaded' || leftDocument.readyState == 'complete')
- {
- leftDocument.getElementById("notes").style.display = 'block';
- leftDocument.getElementById("others").style.display = 'none';
- }
var leftDocument=window.parent.frames("leftFrame").document;
if(leftDocument.readyState == 'loaded' || leftDocument.readyState == 'complete')
{
leftDocument.getElementById("notes").style.display = 'block';
leftDocument.getElementById("others").style.display = 'none';
}
- <script language="javascript">
-
- if (document.readyState=="complete")
- {
- AdjustImageSize();
- }
- else
- {
- document.onreadystatechange = function()
- {
- &nbs