62,047
社区成员
发帖
与我相关
我的任务
分享
//
function createXMLHttpRequest(){
var xmlHttp=false;
try{
xmlHttp = new XMLHttpRequest();
}
catch(trymicrosoft){
try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(othermicrosoft){
try{xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
catch(failed){}
}
}
return xmlHttp;
}
var t = false;
//
function getWebContent(url){
var xmlHttp = createXMLHttpRequest();
xmlHttp.open("get",url,true);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4&&xmlHttp.status==200){
if(xmlHttp.responseText.toString().toLowerCase()=="true"){
clearTimeout(t);
alert("采集完成,或者没有需要采集的队列...");
return;
}else{
document.getElementById("result").innerHTML = xmlHttp.responseText;
}
}//end if readyState
}//eixt function
xmlHttp.send(null);
}
//
function doPick(bid){
getWebContent("doPick.aspx?t=" + Math.random() + "&bid=" + escape(bid));
//alert("doPick.aspx?t=" + Math.random() + "&bid=" + escape(bid));
t=setTimeout('doPick(' + bid + ')',5000);//5000毫秒执行一次
}