标签:js 图片轮换
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>Document</title> <script type="text/javascript"> var i=0; function onload(){ setInterval(‘changeImage()‘,2000); } function changeImage(){ var imagess=[‘3.png‘,‘4.png‘,‘5.png‘,‘6.png‘]; document.getElementById(‘myImage‘).src=imagess[i]; i++; if(i==4) { i=0; } } </script> </head> <body onload="onload()"> <div> <img id="myImage" src="3.png" /> </div> </body> </html>
本文出自 “Java大白的战地” 博客,请务必保留此出处http://8023java.blog.51cto.com/10117207/1660577
标签:js 图片轮换
原文地址:http://8023java.blog.51cto.com/10117207/1660577