-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path202010230919001进行筛选用户信息.html
52 lines (47 loc) · 1.17 KB
/
202010230919001进行筛选用户信息.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!--
* @Author: [JokerChen]
* @Date: 2020-10-23 09:19:13
* @LastEditors: [JokerChen]
* @LastEditTime: 2020-10-23 10:47:14
* @Description:
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="js/jquery-1.7.2.min.js"></script>
<title>进行筛选用户信息</title>
</head>
<body>
</body>
</html>
<script>
$(function () {
getInfo();
})
function getInfo() {
$.ajax({
type: "GET",
url: "data/ssgl.json",
contentType: "application/x-www-form-urlencoded; charset=utf-8",
dataType: "json",
success: function (res) {
if (res.rows) {
// var menuArray = res.rows;
// console.log(res.rows);
var arrData = res.rows;
var obj = {}
var info=[];
for (var i = 0; i < arrData.length; i++) {
var item = arrData[i].QinShiParentName // a为计算的属性,可换成b,c
obj[item] = (obj[item] + 1) || 1
info.push(obj[item])
}
var max = Math.max.apply(null, info);
console.log(max);
}
}
});
}
</script>