-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path38.html
More file actions
92 lines (89 loc) · 2.41 KB
/
38.html
File metadata and controls
92 lines (89 loc) · 2.41 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
*{
padding: 0;
margin:0;
}
td:hover,th:hover{
background-color:#eee;
}
th{
background-color: #A768C7;
color: #fff;
}
span{
cursor:pointer;
}
div{
margin:50px;
}
table{
margin:0 auto;
/* table默认宽高尽量小,所以可以在width不设置的情况margin居中 */
text-align:center;
border-collapse: collapse;
}
</style>
</head>
<body>
<div id="test1"></div>
<div id="test2"></div>
<div id="test3"></div>
<script type="text/javascript" src="js/tableTool.js"></script>
<script type="text/javascript">
var table1 = new TableTool({
table_name:"table1",
table_head:["Name","Chinese","Computer","English"],
isSort:[0,1,1,1],
tbody_obj:{
1:["小明",20,90,40],
2: ["小红", 90, 60, 90],
3: ["小肛", 60, 100, 70],
4: ["小3", 30, 50, 10],
5: ["小鸟", 10, 20, 30]
},
tdWH:[200,50],
head_color:"#eee",
table_color:"#F8C0FF",
isFrozen:1
},'test1');
var table2 = new TableTool({
table_name: "table2",
table_head: ["Name", "Chinese", "Computer", "English"],
isSort: [0, 1, 1, 1],
tbody_obj: {
1: ["小2", 20, 90, 40],
2: ["小红", 90, 60, 90],
3: ["小4", 60, 100, 70],
4: ["小E", 60, 20, 70],
5: ["小W", 60, 100, 60],
},
tdWH: [200, 50],
head_color: "rgb(74,158,158)",
table_color: "rgb(28,170,125)",
isFrozen:0
},'test2')
var table3 = new TableTool({
table_name: "table3",
table_head: ["Name", "qwe", "ewq", "dsa"],
isSort: [0, 1, 1, 1],
tbody_obj: {
1: ["小1", 20, 90, 40],
2: ["小2", 90, 60, 90],
3: ["小3", 60, 100, 70],
4: ["小4", 60, 20, 70],
5: ["小5", 60, 100, 60],
},
tdWH: [200, 50],
head_color: "rgb(114,58,158)",
table_color: "rgb(28,70,125)",
isFrozen: 1
})
</script>
</body>
</html>