-
Notifications
You must be signed in to change notification settings - Fork 0
/
testServer.html
34 lines (34 loc) · 912 Bytes
/
testServer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
var id=7467;
var num=0;
var cDate=new Date();
var timeStart=cDate.getTime();
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.status == 200 && xhr.readyState == 4) {
console.log(JSON.parse(xhr.responseText));
num++;
id=id+2;
if(num<10){
xhr.open('GET', "/data/modelData/"+id+".json");
xhr.send();
}else{
var cDate=new Date();
var timeEnd=cDate.getTime();
var loadTime=timeEnd -timeStart;
console.log("group time:"+ loadTime);
}
}
};
xhr.open('GET', "/data/modelData/"+id+".json");
xhr.send();
</script>
</body>
</html>