-
Notifications
You must be signed in to change notification settings - Fork 0
/
tableUI.html
69 lines (68 loc) · 1.52 KB
/
tableUI.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery插件开发初步-美化表格</title>
<style>
*{margin:0;padding:0;}
table{width:500px;text-align:center;margin: 10px auto;cursor:pointer;}
tr{height:26px;line-height:26px;}
.evenRow_new{background-color:#f0f0f0;}
.oddRow_new{background-color:#fff;}
.activeRow_new{background-color:#FFFF55;}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="tableUI.js"></script>
<script>
$(function(){
$('#table_solid').tableUI({
evenRowClass: 'evenRow_new',
oddRowClass: 'oddRow_new',
activeRowClass: 'activeRow_new'
});
});
</script>
</head>
<body>
<table id="table_solid" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>姓名</th>
<th>班级</th>
<th>学分</th>
<th>学院</th>
</tr>
<tr>
<td>
Maple
</td>
<td>
4班
</td>
<td>
8.0
</td>
<td>
计算机科学与技术
</td>
</tr>
<tr>
<td>Sonny</td>
<td>2班</td>
<td>7.6</td>
<td>商学院</td>
</tr>
<tr>
<td>Peter</td>
<td>1班</td>
<td>8.6</td>
<td>电子工程学院</td>
</tr>
<tr>
<td>Amy</td>
<td>2班</td>
<td>8.5</td>
<td>美术学院</td>
</tr>
</table>
</body>
</html>