<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> img{ width: 400px; height: 300px; box-shadow: 2px 3px 2px gray; } </style> </head> <body> <img src="img/1.jpg" id="myImg" /> <script type="text/javascript"> var myImg = document.getElementById("myImg"); var imgs=["1.jpg", "2.jpg", "3.jpg","4.jpg", "5.jpg","6.jpg", "7.jpg", "8.jpg"]; var intervalID = setInterval(chgImg,1000); function chgImg(){ for(var i=0;i<imgs.length;i++){ myImg.src="img/"+imgs[i]; } } </script> </body> </html>
winner4265975
慕运维2284031
错过了年华
慕的地6079101
qq_薛定谔的猫_6