JS可控制的图片自动循环播放查看效果
JS可控制的图片自动循环播放查看效果
<html>
<head>
<title>JS可控制的图片自动循环播放查看效果丨芯晴网页特效丨CsrCode.Cn</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}<!--www.dyunr.com-->
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}<!--www.dyunr.com-->
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
}
}
// End -->
</script>
<center>
<form name=slideform>
<table cellspacing=1 cellpadding=4 bgcolor="#000000">
<tr>
<td align=center bgcolor="white">
<b>图片循环</b>
</td>
</tr>
<tr>
<td align=center bgcolor="white"width=0 height=150>
<img src="/images/m01.jpg" name="show" style="cursor:pointer;" onclick="javascript:window.open(this.src);" onload="return imgzoom(this,600);"/></td>
</tr>
<tr>
<td align=center bgcolor="#C0C0C0">
<select name="slide" onChange="change();">
<option value="/images/m01.jpg" selected>图片1 红叶传情
<option value="/images/m02.jpg">图片2 野花绽放
<option value="/images/m03.jpg">图片3 往事如茶
<option value="/images/m04.jpg">图片4 油菜花开
<option value="/images/m05.jpg">图片5 玫瑰情思
<option value="/images/m06.jpg">图片6 玫瑰情思
<option value="/images/m07.jpg">图片7 玫瑰情思
<option value="/images/m08.jpg">图片8 玫瑰情思
<option value="/images/m09.jpg">图片9 哈萨雅琪
<option value="/images/m10.jpg">图片10 往事如茶
</select>
</td>
</tr>
<tr>
<td align=center bgcolor="#C0C0C0">
<input type=button onClick="first();" value="|<<" title="Beginning">
<input type=button onClick="previous();" value="<<" title="Previous">
<input type=button name="slidebutton" onClick="ap(this.value);" value="Start" title="AutoPlay">
<input type=button onClick="next();" value=">>" title="Next">
<input type=button onClick="last();" value=">>|" title="End">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
<br><br><hr><p align="center"><font color=black>本特效由 <a href="http://www.CsrCode.cn" target="_blank">芯晴网页特效</a>丨CsrCode.Cn 收集于互联网,只为兴趣与学习交流,不作商业用途。</font></p>
原文网址:http://www.csrcode.cn/article-3160-1.html
JS可控制的图片自动循环播放查看效果的更多相关文章
- JS图片自动或者手动滚动效果(支持left或者up)
JS图片自动或者手动滚动效果(支持left或者up) JS图片自动或者手动滚动效果 在谈组件之前 来谈谈今天遇到搞笑的事情,今天上午接到一个杭州电话 0571-28001187 即说是杭州人民法院的 ...
- video.js不能控制本地视频或者音频播放时长
问题: 把视频放到本地,然后对视频进行测试,想要控制视频或者音频的播放时长,没办法做到,每次拉动进度条,都会使得本地视频重新播放 原因: 所有浏览器默认js无法访问本地地址,也就是说js不能对本地文件 ...
- js 图片自动循环切换setInterval();
stlye样式定义 <style type="text/css"> body{background-image: url(img/001.jpg ...
- video 自动循环播放
video 只加autoplay并不能自动播放,需要再加上muted <video controls="controls" autoplay loop muted> ...
- php广告图片循环播放 幻灯片效果
<!DOCTYPE> <html> <head> <meta http-equiv="content-type" content=&quo ...
- webview自动循环播放
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=&q ...
- JS实现简单的图片透明度循环变化(渐变)
找了好多,都是由100到0就结束了,到头来自己魔改,以下就是源码. div中加入img,js添加函数,完事(调用),取名后面加个1是为了避免冲突 <!DOCTYPE HTML> <h ...
- 用jquery或js实现三个div自动循环轮播
//3个div的统一class = 'div' var index =0; //3秒轮播一次 var timer = setInterval(function(){ index = (inde ...
- 图片3d轮放查看效果
本功能比較简单,就是一个大幕.左右滚动播放图片. 关键点在于怎样实现平滑的滚动,包含动画效果,3d效果等. <style> img { position: absolute; top:20 ...
随机推荐
- Android 动画效果 及 自定义动画
1. View动画-透明动画效果2. View动画-旋转动画效果3. View动画-移动动画效果4. View动画-缩放动画效果5. View动画-动画效果混合6. View动画-动画效果侦听7. 自 ...
- GlusterFS简单配置
1.准备工作 准备三台机器(物理机或者虚拟机均可)用于安装和测试GlusterFS,其中两台用作服务器,一台用作客户端,主机名分别为: Server1.zhaogang.int 10.0.21.24 ...
- 设置android状态栏颜色和toolbar颜色一致
使用:https://github.com/jgilfelt/SystemBarTint在Activity中:@Overrideprotected void onCreate(Bundle saved ...
- Highways
poj1751:http://poj.org/problem?id=1751 题意:给你n个城市,每个城市的坐标给你,然后为了是每个城市都连通,需要在已经建了一些街道额基础上,再次建一些街道使其连通, ...
- Truck History(poj 1789)
Description Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for v ...
- NtQuerySystemInformation的使用(提供50余种信息)
今天,我们主要讨论的是一个函数NtQuerySystemInformation(ZwQuerySystemInformation).当然,你不要小看这么一个函数,它却为我们提供了丰富的系统信息,同时还 ...
- ArrayList LinkedList Vector
ArrayList是基于数组实现的,没有容量的限制. 在删除元素的时候,并不会减少数组的容量大小,可以调用ArrayList的trimeToSize()来缩小数组的容量. ArrayList, Lin ...
- TransactionScope IsolationLevel 事务隔离级别
事务有四个特性 第一原子性,事务具有独立的不能被拆分的,不能只做部分,事务的性质是要么全做,要么都不做. 第二统一性,在事务执行之前和事务执行之后的数据是一致. 第三隔离性,事务是独立的,开发者不能查 ...
- 吉哥系列故事――临时工计划(dp)
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Descr ...
- 【动态规划】【KMP】HDU 5763 Another Meaning
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 题目大意: T组数据,给两个字符串s1,s2(len<=100000),s2可以被解读成 ...