JS 自动更换背景
时间:2015/12/3 22:43:00来源:互联网 作者:flyso 点击: 1529 次
<html> <script> var aaa=['1.jpg','2.jpg','3.jpg']; var count = 0; function on_load(){ document.body.style.background="url("+aaa[count]+")"; if (++count == aaa.length){ count = 0; } } setInterval("on_load()",1000); </script> <body>
</body> </html> |