<!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 p_w_picpathss=['3.png','4.png','5.png','6.png']; document.getElementById('myImage').src=p_w_picpathss[i]; i++; if(i==4) { i=0; } } </script> </head> <body onload="onload()"> <div> <img id="myImage" src="3.png" alt="" /> </div> </body> </html>
JS实现简单的图片轮换效果
原创
©著作权归作者所有:来自51CTO博客作者Java大白的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Vue3 实现一个简单的路由切换效果
Vue3 实现一个简单的路由切换效果
vue router -
(转)一个好的图片轮换效果
这是一个网页设计中经常会用到的图片特效,实现多个图片之间的轮换,并分
class 百度 filter border float -
实现一个简单的图片轮播效果
学习笔记思路这里就说一下我的思路吧,我们可以先将所有图片的不透明度设置为0.
前端 js css html 新星计划 -
如何实现一个图片的伪预览效果
## 前言 我是歌谣 我有个兄弟 巅峰的时候排名c站总榜19 叫前端小歌谣 曾经我花了三年的时间创=
java 开发语言 前端 分割线 解决方案 -
图片、切换-js实现图片轮换效果-by小雨
() { //两张图片切换方法1 /*numb++;
html 图片切换 javascript xml 3c