<script language="javascript">
function alternate()
{
var s=0;
var str=new Array();
str={
"Index/Photos/20110216083802462.jpg",
"Index/Photos/20110216091845177.jpg",
"Index/Photos/20110216095448697.jpg",
"Index/Photos/20110216110652133.jpg",
"Index/Photos/20110216125400102.jpg"
}
if(s>4)
{
s=0;
document.getElementById("bigImage2").src=str[s];
s++;
}
else
{
document.getElementById("bigImage2").src=str[s];
s++;
}
}
setInterval("alternate()",2000);
</script>
请问哪里出错了?为什么老说我缺少对象?
试试这个图片切换
有12345数字一起切换
鼠标点一下数字会变换到另一张图片,不点就会自动换
里面有教程和源码
参考资料:http://www.blueidea.com/common/shoutbox/redir.asp?4=b&id=10895