<!DOCTYPE html>
<html>
<head>
<title>การทำภาพเลื่อนอัตโนมัติ</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body onload="javascript:slideImage();">
<img id="imgeslide"
src = "https://scontent.fbkk1-1.fna.fbcdn.net/v/t1.0-9/1912296_659001374147323_772249002_n.jpg?oh=526c47f25d7d2a71bfc5507783b93c05&oe=5800BCE2"
width = "200"
>
<script>
var i = 0;
function slideImage() {
var img = new Array();
img[0] = "https://scontent.fbkk1-1.fna.fbcdn.net/v/t1.0-9/1912296_659001374147323_772249002_n.jpg?oh=526c47f25d7d2a71bfc5507783b93c05&oe=5800BCE2";
img[1] = "https://scontent.fbkk1-1.fna.fbcdn.net/v/t1.0-9/1896808_648820028498791_876310772_n.jpg?oh=907b7328c80d21fdfdb7fc0caeeb6aab&oe=57F03083";
img[2] = "https://scontent.fbkk1-1.fna.fbcdn.net/v/t1.0-9/1622170_674743875906406_8742626131493373045_n.jpg?oh=308e46ca4095792f7ffdfee8683dab42&oe=57FDCB2A";
var slide = document.getElementById("imgeslide");
slide.src = img[i];
var delayTime = setTimeout("slideImage()", 2000);
i = i + 1;
if (i >= 3) {
i = 0;
}
}
</script>
</body>
</html>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น