在我的应用程序中,我每1000 毫秒调用一个方法来检查文档readyState
。以下是我正在使用的代码:
var success=setInterval(""CheckState()"",1000);
function CheckState(){
if($get('businessDownl').document.readyState=="interactive" ||
$get('businessDownl').document.readyState=="complete"){
alert("Great");
clearInterval(success);
}
}
此代码在 IE 浏览器中运行良好,但在 Firefox 和 Chrome 浏览器中失败。我也尝试使用
$get('businessDownl').readyState
,它打印为未定义。谁能告诉我如何readyState
在上述情况下使用 Firefox 和 Chrome?