You are on page 1of 1

<html>

<head>
<script language="javascript">
var i = 1;
function oh()
{
obj_img = document.getElementById('img_rotating');
obj_img.src = 'images/img_' + i +'.gif';
i = 3-i;
}
mytest =setInterval("oh();",3000);
</script>
</head>
<body onload='mytest'>
<img id="img_rotating" src='images/img_1.gif'>
</body>
</html>

Bạn đặt các ảnh có tên dạng img_0(1,2,3).gif vào thư mục images

You might also like