如何判断页面是否加载完毕?
function on(){
if ( window.onload )
{
alert( "page onload." );
}
else{
window.setTimeout( on, 1000);
}
}
on();
---------------------------------------------------------------
寻梦草人的代码
---------------------------------------------------------------
function loadWindow()
{
if(frm.document.readyState == "complete")
alert("加载完成!");
else
setTimeout("loadWindow()", 500)
}
loadWindow()
或者
timer=setInterval(checkload,100)
function checkload(){
if(frmid.readyState!="complete")
{
clearInterval(timer);
alert("加载完毕.")
}
}