js幻灯
来源:互联网 发布:佳能6dmark ii知乎 编辑:程序博客网 时间:2024/06/09 18:28
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<div align="center"><div id=AdRotator></div><input id="second"><button onclick="adRotator.set(getRef('second').value)">set time</button></div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function adRotator() {};
adRotator.initialize=function(o)
{
// script by blueDestiny
this._t = new Array();
this._l = new Array();
this._p = new Array();
this._i = new Image();
this._c = 0;
this._f = false;
this._o = o;
this._timeout = null;
this._html = "";
// configration.
// @ image width
// @ image height
// @ rotator speed
// @ filter type
this._w = 450;
this._h = 450;
this._s = 4;
this._x = 23;
return this;
};
adRotator.add=function(p,t,l) { with (this)
{
_p.push(p);
_t.push(t);
_l.push(l);
}};
adRotator.load=function() { with (adRotator)
{
if( _i.readyState=='complete' )
{
if(_p.length-1==_c)
{
_f = true;
_c = 0;
window.clearTimeout(_timeout);
//getRef("AdRotator").innerHTML="complete";
adRotator.play();
}
else
{
_c++;
getRef(_o).innerHTML="total images " + _p.length + ", loading picture " + _c + ' ' + _i.readyState + "...";
_timeout=window.setTimeout(adRotator.load,10)
}
}
else
{
getRef(_o).innerHTML="total images " + _p.length + ", loading picture " + _c + ' ' + _i.readyState + "...";
_timeout=window.setTimeout(adRotator.load,10)
}
}};
adRotator.play=function() { with (adRotator)
{
if( _f )
{
_html = "";
_html += '<table style="border:1px solid #333333;"><tr><td style="font-size:9pt;font-family:tahoma;font-weight:bold;">'
_html += '<div id="rotatorPlayer"'
+ ' style="width:' + _w + ''
+ ';height:"' + _h + '"'
+ '>'
_html += '<a href="' + ( _l[_c] ? _l[_c] : "javascript:void(0);" ) + '">';
_html += '<img id="rotatorPic" src="' + _p[_c] + '"'
+ ' width="' + _w + '"'
+ ' height="' + _h + '"'
+ (_t[_c]?' title="' + _t[_c] + '"':'')
+ ' style="border:1px solid blue;FILTER:revealTrans(transition=' + _x + ',duration=1);"'
+ ' >';
_html += (_t[_c]?('<div align="center">' + (_c+1) + '. ' + _t[_c] + '</div>'):'<p></p>');
_html += '</a>';
_html += "</div>";
_html += '<div align="right">';
for(var i=0; i<_p.length; i++)
_html += '<span'
+ ' style="border:1px solid #333333;padding:1px 5px 1px 5px;height:20px;text-align:center;cursor:'
+ (_c==i ? ('default;background-color:red;"') : 'hand;" onclick="adRotator.select(' + i + ')"')
+ '>'
+ (i>8?(i+1):('0'+(i+1)))+ '</span> ';
_html += "</div></td></tr></table>";
getRef(_o).innerHTML = _html;
getRef("rotatorPic").filters[0].Apply();
getRef("rotatorPic").filters[0].Play();
next();
}
else
{
_i.src = _p[_c];
adRotator.load();
}
}};
adRotator.next=function() { with (this)
{
(_p.length-1==_c) ? _c=0 : _c++;
_timeout=window.setTimeout(adRotator.play,_s*1000);
}};
adRotator.select=function(i) { with (this)
{
window.clearTimeout(_timeout);
_c=i;
adRotator.play();
}};
adRotator.set=function(second) { with (this)
{
window.clearTimeout(_timeout);
if((//d+/).test(second)==true)
{
_s=second;
adRotator.play();
}
else
{
alert("must be digit!")
adRotator.play();
}
}};
function getRef(id)
{
return (document.all?document.all(id):document.getElementById(id));
}
adRotator.initialize("AdRotator");
adRotator.add("http://img1.qq.com/ent/20060218/3215110.jpg","aa","http://www.blueidea.com")
adRotator.add("http://img1.qq.com/ent/20060218/3215111.jpg")
adRotator.add("http://img1.qq.com/ent/20060218/3215112.jpg")
adRotator.add("http://img1.qq.com/ent/20060218/3215113.jpg")
adRotator.add("http://img1.qq.com/ent/20060218/3215114.jpg")
adRotator.play();
//-->
</SCRIPT>
</BODY>
</HTML>
- js幻灯
- 简单js幻灯,背景幻灯+前景幻灯
- js文字幻灯效果
- JS幻灯图片效果
- 一款基于js的幻灯图片代码
- 超漂亮Js+css图片幻灯切换
- JS实现的幻灯上滚效果
- 调用图片幻灯切换效果js代码
- 超漂亮Js+css图片幻灯切换
- 超漂亮Js+css图片幻灯切换
- 超漂亮Js+css图片幻灯切换
- JS切换图片幻灯切换效果
- js做的flash形式的幻灯图片
- js 文本在一行内幻灯显示效果
- 首页幻灯图js (还有点小问题)
- js 仿淘宝首页最新图片幻灯切换效果
- asp.net+js方式实现的幻灯图片效果展示
- 【仅支持移动设备】Swipe.JS轻量级移动幻灯效果
- Linux 指令篇:文件系统--e2fsck
- 从世俗中提炼的粗糙代码!RadioButtonList,label
- GOOGLE 谷歌输入法 出现漏洞 可以提升权限 以及远程入侵
- Linux 指令篇:文件系统--exportfs
- vs2005应用之GridView
- js幻灯
- JS:多选择(Select)脚本,add options
- Linux 指令篇:文件系统--fdisk
- 用Dom4j解析XML及中文问题(一)
- TabCtrl控件的使用一则——程序架构
- Linux 指令篇:文件系统--fsck
- Linux 指令篇:文件系统--mkfs
- 博客开章
- EXEC master..xp_cmdshell 'bcp inzool.dbo.Out_Dv_Topic out c:/temp1.xls -c -q -S"127.0.0.1" -U"sa" -P"111111"'