问题描述
解决方案
var pos = 0;
setInterval(function(){
pos++;
if(pos>5) pos = 1;
document.getElementsByTagName(""body"")[0].style.background = ""url(images/0""+pos+"".jpg) round"";
} 3000);
解决方案二:
function chgCol(){pos++;document.getElementByTagName('body')[0].sytle.background=""url(images/0""+(pos>4?0:pos)+"".jpg) round"";}
解决方案三:
var pos = 0;
setInterval(chgCol(){
pos++;
if(pos>5) pos = 1;
document.getElementsByTagName(""body"")[0].style.background = ""url(images/0""+pos+"".jpg) round"";
} 3000);
解决方案四:
<script type=""text/javascript""> function round(i){ if(i>5)i=1; setTimeOut(function(){document.getElementByTagName('body')[0].sytle.background=""url(images/0""+(pos>4?0:pos)+"".jpg) round"";}); } round(1);</script>
解决方案五:
<br> function round(i){</p><pre><code> setTimeOut(function(){document.getElementByTagName('body')[0].sytle.background="url(images/0"+(i++>5?0:i)+".jpg) round";});}round(1);</code></pre><p>
解决方案六:
时间: 2024-10-30 06:57:53