function ftp()
{
$.ajax({
url:"getftp.action",
data:{TaskName:value,ipdata:ipdata},
type:"POST",
dataType:"text",
success:function(data){
if(data=='COMPLETED')
{
$.ajax({
url:"getUrl.action",
type:"POST",
data:{TaskName:value,ipdata:ipdata},
dataType:"text",
success:function(data)
{
$(".a"+id[1]+"").attr("href",data);
}
})
window.clearInterval(ftputl);
}else
{
var jindutiao = document.getElementById(id[1]);
jindutiao.style.width = data + "%";
jindutiao.innerHTML = jindutiao.style.width;
$(".b"+id[1]+"").empty();
$(".b"+id[1]+"").append(jindutiao.style.width);
if(jindutiao.style.width == "100%"){
window.clearInterval(ftputl);
}
}
}
})
}
ftpurl= window.setInterval(function(){ftp();},1000);
window.onload = function(){
ftpurl;
}
我想让他等于COMPLETED的时候不执行了但是没反应