幻灯片轮播~slideshow
2015-01-22 23:43
441 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script language="javascript" type="text/javascript"> var imgarr = new Array("1.png" , "2.png", "3.png"); var index=0; function preimg() { index--; if(index>=0&& index <imgarr.length) { document.bgimg.src=imgarr[index]; }else { index = imgarr.length -1; document.bgimg.src=imgarr[index]; } } function nextimg() { index++; if(index> imgarr.length -1) { index=0; document.bgimg.src=imgarr[index]; } else { document.bgimg.src=imgarr[index]; } } var yinyong = setInterval(nextimg, 3000); function stop() { clearInterval(yinyong); } </script> </head> <body onload="yinyong()"> <img name="bgimg" src="1.png" width="400px" height="400px"/> <div style="position:absolute;left:12px;top:170px;"> <a href="JavaScript:preimg();"><img src="pre.png"/></a> </div> <div style="position:absolute;left:340px;top:170px;"> <a href="JavaScript:nextimg();"><img src="next.png" /></a> </div> <a href="JavaScript:stop()"> stop</a> <a href="JavaScript:start()" onclick="yinyong= setInterval(nextimg, 3000); "> start</a> </body> </html>
相关文章推荐
- jquery banner广告幻灯片图片轮播切换,模仿实现当当网滚动广告效果
- 如何快速写出漂亮的轮播图、幻灯片?
- 一套完整的flash头部banner幻灯片特效,形式如图片轮播
- 网页3D幻灯片[3D SLIDESHOW]
- javascript轮播图,幻灯片效果
- js实现幻灯片轮播原理
- 自己写的两个JQ部件 其一 图片轮播SlideShow
- Skidder响应式全屏横向排列无限轮播幻灯片插件
- OpenCart之幻灯片(Slideshow)模块教程
- 如何实现幻灯片效果/图片轮播
- OpenCart之幻灯片(Slideshow)模块教程
- jQuery超精致图片轮播幻灯片特效代码分享
- slideshow 轮播的使用方法介绍
- OpenCart之幻灯片(Slideshow)模块教程
- 基于skitter的轮播图炫酷效果,幻灯片的体验
- 【js与jquery】幻灯片轮播切换效果
- coin slider 幻灯片轮播插件
- jQuery+html5实现的3D动态切换焦点轮播幻灯片
- Framework7学习笔记之 幻灯片(轮播图)
- Bootstrap幻灯片轮播图支持触屏左右手势滑动的实现方法