bindReady();
});
if(window == window.top)
{
timer = setInterval(function(){
try
{
isReady||document.documentElement.doScroll(‘left’);//在IE下用能否执行doScroll判断 dom是否加载完毕
}
catch(e)
{
return;
}
bindReady();
},5);
}
}
})();
使用方法如下:
ready(dosomething);//dosomething为已存在的函数
//也可以通过闭包来使用
ready(function(){
//这里是逻辑代码
});










