广告轮显为什么运行不了,哪错了?
<html><head><title></title></head>
<body>
<script>
var i=1;
var tmpobj=setInterval("addtime()",1000);
function addtitme()
{if(i==1)
{document.getElementById("j1").style.display='none';
document.getElementById("j2").style.display='block';
document.getElementById("j3").style.display='block';
i=2;
}
else if(i==2)
{document.getElementById("j1").style.display='block';
document.getElementById("j2").style.display='none';
document.getElementById("j3").style.display='block';
i=3;
}
else if(i==3)
{document.getElementById("j1").style.display='block';
document.getElementById("j2").style.display='block';
document.getElementById("j3").style.display='none';
i=1;
}
</script>
<div id="j1" style="display:block"><img src="../picture/rz.jpg"></div>
<div id="j2" style="display:block"><img src="../picture/zj.jpg"></div>
<div id="j3" style="display:none"><img src="../picture/lovef.jpg"></div>
</body>
</html>