-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml.html
More file actions
39 lines (32 loc) · 844 Bytes
/
html.html
File metadata and controls
39 lines (32 loc) · 844 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="box" style="position: relative; overflow: hidden; height: 100px; width: 100px;">
<div id="images" style="position: absolute; left: 0px; width: 700px; ">
</div>
<button>上一张</button>
<button>下一张</button>
<button>暂停</button>
</div>
<script language="javascript">
var s = {
images: ['1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg'],
init: function () {
for (var i = 0; i < s.images; i++) {
var img = document.createElement("img");
img.style.float = "left";
document.getElementById("images").appendChild(img);
}
},
up: function () {
},
down: function () {
}
}
s.init();
</script>
</body>
</html>