用js写了一个比较简单常用的图片幻灯片
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<img id="img1" src="QQad3.png">
</body>
<script type="text/javascript">
var char = ["QQad0.png","QQad1.png","QQad2.png"];
var i = 0;
var t;
var im = document.getElementById("img1");
function changeImage()
{
if (i >= char.length) {i = 0;}
//console.info(char[i]);
//console.info(im);
im.src = char[i];
console.info("im:"+im.src);
i++;
t = setTimeout(changeImage,1000);
}
</script>
<script type="text/javascript">
window.onload = changeImage();
</script>
</html>