<html>
<head>
<title>图片渐变轮换效果</title>
<meta name="generator" content="editplus">
<meta name="author" content="">
</head>
<body>
<p>图片渐变轮换效果(IE),请等几秒钟看效果</p>
<a href="#" id="javascript.a"><img src="http://www.12free.cn/kelven/mypic/1.JPG" id="javascript.img" border=0 style="filter:blendTrans(duration=2)" width="240" height="180"></a>
<script>
<!--
var ImgSrc = new Array();//图片地址
ImgSrc[0] ="http://www.12free.cn/kelven/mypic/2.JPG";
ImgSrc[1] = "http://www.12free.cn/kelven/mypic/3.JPG";
ImgSrc[2] = "http://www.12free.cn/kelven/mypic/4.JPG";
ImgSrc[3] ="http://www.12free.cn/kelven/mypic/5.JPG";
ImgSrc[4] = "http://www.12free.cn/kelven/mypic/6.JPG";
ImgSrc[5] = "http://www.12free.cn/kelven/mypic/7.JPG";
ImgSrc[6] = "http://www.12free.cn/kelven/mypic/8.JPG";
ImgSrc[7] = "http://www.12free.cn/kelven/mypic/9.JPG";
for (var i=0;i<ImgSrc.length;i++){(new Image()).src = ImgSrc[i];}//预加载图片
var ImgAlt = new Array();//鼠标放上去显示的文字
ImgAlt[0] = "美国《国家地理杂志》1"
ImgAlt[1] = "美国《国家地理杂志》2"
ImgAlt[2] = "美国《国家地理杂志》3"
ImgAlt[3] = "美国《国家地理杂志》4"
ImgAlt[4] = "美国《国家地理杂志》5"
ImgAlt[5] = "美国《国家地理杂志》6"
ImgAlt[6] = "美国《国家地理杂志》7"
ImgAlt[7] = "美国《国家地理杂志》8"
var ImgHerf = new Array();//链接
ImgHerf[0] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_01.htm"
ImgHerf[1] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_02.htm"
ImgHerf[2] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_03.htm"
ImgHerf[3] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_04.htm"
ImgHerf[4] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_05.htm"
ImgHerf[5] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_06.htm"
ImgHerf[6] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_07.htm"
ImgHerf[7] = "http://www.12free.cn/kelven/mypic/Usa_geography/pic2006/page_08.htm"
var step=0;
function slideit(){
var oImg = document.getElementById("javascript.img");
if (document.all){oImg.filters.blendTrans.apply();}
oImg.src=ImgSrc[step];
document.getElementById("javascript.a").href=ImgHerf[step];
oImg.title=ImgAlt[step];
if (document.all){oImg.filters.blendTrans.play();}
step = (step<(ImgSrc.length-1))?(step+1):0;
(new Image()).src = ImgSrc[step];//加载下一个图片
}
setInterval("slideit()",3000);
//-->
</script>
</body>
</html>
posted on 2006-08-01 14:06
kelven 阅读(464)
评论(0) 编辑 收藏 所属分类:
HTML