邯郸市领创中等专业学校,是经河北省教育厅、邯郸市教育局批准成立的全日制中职学校。
领创新闻

幻灯片代码

时间:2013-05-27 17:08:23 发布:admin 来源:未知

<!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=GBK" />
<title>简单高效的javascript 幻灯片播放 - Liehuo.net</title>
</head>
<body>
<div>
<div id="divs">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_1.jpg" id="1"  style="FILTER: revealTrans(duration=2,transition=16); cursor:pointer;" onclick="location.href = 'http://tool.liehuo.net'">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_2.jpg" id="2"   style="FILTER: revealTrans(duration=2,transition=17);  cursor:pointer;display:none" onclick="location.href = 'http://bbs.liehuo.net'">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_3.jpg" id="3"   style="FILTER: revealTrans(duration=2,transition=18);  cursor:pointer;display:none" onclick="location.href = 'http://www.liehuo.net'">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_4.jpg" id="4"   style="FILTER: revealTrans(duration=2,transition=19);  cursor:pointer;display:none" onclick="location.href = 'http://blog.liehuo.net'">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_5.jpg" id="5"   style="FILTER: revealTrans(duration=2,transition=20);  cursor:pointer;display:none" onclick="location.href = 'http://baike.liehuo.net'">
<img  src="/d/file/uploads/common/images/liehuonet_400x345_6.jpg" id="6"   style="FILTER: revealTrans(duration=2,transition=21);  cursor:pointer;display:none" onclick="location.href = 'http://link.liehuo.net'">
</div>
<script language="javascript">
function $(_sId) {
return document.getElementById(_sId);
}
var speed=3000;
var setid=null;
var auto="true";
function galleryplay(divs,a,mtime){ //t为要应用此函数的id,a初始化时显示的项目的顺序数
if(divs=="0")return false;
var start=3;
if(auto=="true")
{
start = a-1;//初始项目
speed = mtime;//切换间隔
setid = null;//定时器
var loop = function(){ //自动切换
ids = divs.split(",");
for (var i=0;i<ids.length; i++)
{
$(ids[i]).style.display='none';
}
$(ids[start]).filters.revealTrans.Transition = Math.floor(Math.random() * 23);
$(ids[start]).filters.revealTrans.apply();
$(ids[start]).filters.revealTrans.play();
$(ids[start]).style.display='';
setid=setTimeout(loop,speed);
start++;
if(start==ids.length){
start=0;
}
};loop();
}
}
galleryplay('1,2,3,4,5,6',1,3000);
</script>
</div>
</body>
</html>

关键字:div 动画代码
友情链接

0310-8170888

工作时间(周一到周日:9:00-17:00)

扫一扫 加关注