forked from liulangnan/aui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtab_frm.html
55 lines (55 loc) · 1.62 KB
/
tab_frm.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>APP</title>
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>
<style>
p {
margin-bottom: 15px;
}
.aui-content-padded {
margin-top: 10px;
}
</style>
<body>
<div class="aui-tab">
<ul class="aui-tab-nav" id="demo1">
<li class="active">标签一</li>
<li>标签二</li>
<li>标签三</li>
</ul>
</div>
<div class="aui-content-padded">
<div class="aui-tab">
<ul class="aui-tab-nav aui-tab-border" id="demo2">
<li class="active">标签一</li>
<li>标签二</li>
<li>标签三</li>
</ul>
</div>
</div>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript">
apiready = function () {
api.parseTapmode();
var demo1 = $api.domAll("#demo1 li");
for(var i in demo1){
$api.addEvt(demo1[i], 'click', function(){
$api.removeCls($api.dom("#demo1 li.active"),'active');
$api.addCls(this,'active');
});
}
var demo2 = $api.domAll("#demo2 li");
for(var i in demo2){
$api.addEvt(demo2[i], 'click', function(){
$api.removeCls($api.dom("#demo2 li.active"),'active');
$api.addCls(this,'active');
});
}
}
</script>
</html>