代码地址: 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));
}
}
});
}
$.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));
}
}
});
}
浙公网安备 33010602011771号