日期:2014-05-16 浏览次数:20343 次
<script type="text/javascript">
window.onload = function (){
autoMove()
}
var tmer = null ;
var i;
function autoMove(){
var oul = document.getElementById('oul');
var oimg = oul.getElementsByTagName('img');
tmer = setInterval ( function (){
for(i=0;i<oimg.length;i++)
{
move(oimg[i],{opacity:0})
//这样的话它将5 个一并遍历出来,不是我想要的效果,我要的是1 秒种换一张,如何实现呢
}
},1000)
}
</script>
var tmer = null, i=0, len=0
var tmer = null, i=0, len=0
function autoMove(){
var oul = document.getElementById('oul');
var oimg = oul.getElementsByTagName('img');
len=oimg.length;
//后面的img在上
i=len-1;
tmer = setInterval (
function (){
move(oimg[i],{opacity:0});
i==0? len-1 : i--; //这样试试
},1000
)
}