进度条弄个 hta 程序就好了

解决方案 »

  1.   

    明显错误的地方:
    1,res=" <percent> "+percent+" <percent> "; 
    标签没封闭~
    2,out.println(" <?xml   version='1.0'   encoding='utf-8'?> "); 
      out.println(" <response> "); 
      out.println(res); 
      out.println(" </response> "); 
      out.close(); 
     
    响应类型是xml的时候不能用println()及print(),只能用write();
    响应类型是text的时候可以用print和write;可能错误的地方:
    var url = "ProgressBarServlet?task=create";

    var url = "ProgressBarServlet?task=poll";
    也就是你的servlet配置是否正确,这点可以从xmlHttp.status结果看出来 
      

  2.   


    还有一处明显错误
    if(index <9){ 
    setTimeout("pollServer",2000); 

    调用方法少个括号~setTimeout("pollServer()",2000); 
      

  3.   

    靠,你们太强了,我这个是照这一个 pdf文件自己打出来的,我也是头一次发贴,多谢大家喽!
    哈哈