-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (34 loc) · 821 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>sliderplayer.js</title>
<meta charset="UTF-8">
<script src="../sliderplayer.js"></script>
<script>
function init(){
var auto=false;
var player=new sliderplayer('images/out.jpg',"player",580,300,function () {
//player.autoplay();
document.addEventListener("mousemove",function(e){
if(!auto)
player.slideplay();
});
document.getElementById("autoplay").addEventListener("click",function(e){
auto=true;
player.autoplay();
});
document.getElementById("slideplay").addEventListener("click",function(e){
auto=false;
player.slideplay();
});
});
}
window.onload=init;
</script>
</head>
<body>
<div id="player"></div>
<button id="autoplay">autoplay</button>|
<button id="slideplay">slideplay</button>|
</body>
</html>