代码地址:  https://files.cnblogs.com/files/watercaltrop/ayn.rar

 

 

for(var i=0;i<1000;i++){
        $.ajax({
           type: "get",
           cache: true,
           async: true,
           url: "http://localhost/ayn/data.html",
           success: function(msg){
             $("#content").html(parseInt($("#content").html()) + 1);
             if($("#content").html() == 999){
                var timestamp2 = Date.parse(new Date());
                console.log("结束时间:" + timestamp2 + " - " + "开始时间:" + timestamp1 + " = 耗时为" + (timestamp2 - timestamp1));  
             }

           }
        });
    }
 

posted on 2015-09-23 09:37  watercaltrop  阅读(122)  评论(0)    收藏  举报