日期:2014-05-16  浏览次数:20379 次

简单的图片切换
简单的图片定时切换效果,如何实现?

------解决方案--------------------
妥了,L@_@K

<body>
<img src= "http://www.csdn.net/ui/styles/public_header_footer/logo_csdn.gif " id= "imgShow " />
<script type= "text/javascript ">
<!--
var oImg = document.getElementById( "imgShow ");
var arrImgUrl = new Array();
arrImgUrl[0] = "http://www.baidu.com/img/logo.gif ";
arrImgUrl[1] = "http://www.csdn.net/ui/styles/public_header_footer/logo_csdn.gif ";
var i = 0;
function showImage()
{
if (i==arrImgUrl.length) i = 0;
oImg.src = arrImgUrl[i++];
}

window.setInterval(showImage, 1000);
//-->
</script>
</body>