var faile_id = "";
  var faileall = "";
  var time = ""; 
    
  for(var i = 0;i < store_ids1.length; i++){
    time = Math.floor((i+1)/store_ids1.length*100);
    document.getElementById("in").style.width=time+"%";  //进度条的width
    document.getElementById("in").innerHTML=time+"%";  //动态输出进度条的百分比    faile_id = makeHtmlRequest(store_ids1[i], time);  //调用ajax方法
    if(faile_id != ""){
      faileall = faileall+faile_id+", ";
    }
  }  FF可以从1%--100%正常展现进度条;但是ie展现有问题,直接显示进度条100%  求解??????

解决方案 »

  1.   

    楼主的ajax方法呢 一起贴出来吧 ajax应用上 IE和FF还是有区别的 浏览器兼容性一直都是很头痛的问题 可能是某个地方又不兼容了吧
      

  2.   


    ajax的方法:function makeHtmlRequest(storeId){
      createXMLHttpRequest();
      var url = "index.php?app=scategory&act=makeHtml&id=" + storeId;
      xmlHttp.open("GET",url,false);
      xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
      var showR=document.getElementById("showR");
      var store_id = "";
      
      xmlHttp.onreadystatechange = function(){
        showR.innerHTML='正在生成店铺纯静态页面...';
        if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
          store_id= xmlHttp.responseText; 
          showR.innerHTML='正在生成店铺纯静态页面...';
        }
      }
        
      xmlHttp.send(null); 
      return store_id; 
    }
      

  3.   

    用setTimeout 递归试试
    ar faile_id = "";
      var faileall = "";
      var time = ""; 
    var i=0;function doRequest(){time = Math.floor((i+1)/store_ids1.length*100);
      document.getElementById("in").style.width=time+"%"; //进度条的width
      document.getElementById("in").innerHTML=time+"%"; //动态输出进度条的百分比  faile_id = makeHtmlRequest(store_ids1[i], time); //调用ajax方法
      if(faile_id != ""){
      faileall = faileall+faile_id+", ";
      }
    i++;
    if(i < store_ids1.length){
    setTimeout(doRequest,10);
    }
    }
       if(i < store_ids1.length){
    setTimeout(doRequest,10);
    }