轮播图

mac2022-06-30  31

<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>轮播图</title> <script> var number=1; var img= null; function fun(){ number++; if(number>3){ number=1; } img= document.getElementById("img"); img.src="img/banner_"+number+".jpg"; }setInterval(fun,3000); </script></head><body> <img src="img/banner_1.jpg" id="img" width="100%"></body></html>  

转载于:https://www.cnblogs.com/newcityboy/p/11403285.html

相关资源:网站前端——图片左右切换(轮播图)
最新回复(0)