forked from liulangnan/aui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrange_frm.html
More file actions
57 lines (55 loc) · 1.89 KB
/
Copy pathrange_frm.html
File metadata and controls
57 lines (55 loc) · 1.89 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
<!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 type="text/css">
.aui-content {
background: #ffffff;
overflow: hidden;
padding: 15px;
}
p {
margin: 10px 0;
overflow: hidden;
}
</style>
<body>
<div class="aui-content">
<p>带有提示的滑块:<span id="value-1">30</span></p>
<div class="aui-range" style="margin-top:30px;">
<input type="range" class="aui-range-danger" value="30" max="100" min="1" step="1" id="range" />
</div>
</div>
<div class="aui-content">
<p>带有提示的滑块:<span id="value-2">40</span></p>
<div class="aui-range" style="margin-top:30px;">
<input type="range" value="40" max="100" min="1" step="1" id="range2" />
</div>
</div>
<div class="aui-content">
<p>普通滑块:<span id="value">50</span></p>
<div class="aui-range"><input type="range" value="50" max="100" min="1" class="aui-range-primary" id="demo" /></div>
</div>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/aui-range.js" ></script>
<script type="text/javascript">
var range = new auiRange({
element:document.getElementById("range")
},function(ret){
document.getElementById("value-1").textContent = ret.value;
})
var range2 = new auiRange({
element:document.getElementById("range2")
},function(ret){
document.getElementById("value-2").textContent = ret.value;
})
document.getElementById("demo").addEventListener("change",function(){
document.getElementById("value").textContent = this.value;
});
</script>
</html>