心情 天空

 




 










访




R
S
S

我的 Blog:
jybbh 最新的 20 条日志
[Ken的日志]
[工作心得]
[编程相关]
[潮汕文化]
[计算机相关]
[WEB相关]
[JAVA相关]
[Eclipse相关]
[Tomcat相关]
[SQL]
全站 Blog:
全站最新的 20 条日志
不断变化的网页背景-滤镜效果切换 [2006-2-21]
jybbh 发表在 WEB相关
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>不断变化的网页背景</title>
<Script>
var backgroundimage=new Array("1.jpg","2.jpg","4.jpg");
var swapspeed=2;
var timer;
var imgpreload=new Array();
if (document.all) {
for (i=0;i<=backgroundimage.length-1;i++) {
imgpreload=new Image();
imgpreload.src=backgroundimage;
}
}
var i_backgroundimage=0;
swapspeed=swapspeed*1000;
function setTransition(){
document.getElementById("id_body").filters.revealTrans.transition=Math.floor(Math.random()*23);
document.getElementById("id_body").filters.revealTrans.apply();
//bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
//bannerADrotator.filters.revealTrans.apply();
}
function playTransition(){
document.getElementById("id_body").filters.revealTrans.play();
//bannerADrotator.filters.revealTrans.play()
}
function swapimages() {
if (document.all) {
window.status=i_backgroundimage;
  setTransition();
document.body.background=backgroundimage[i_backgroundimage];
  playTransition();
i_backgroundimage++;
if (i_backgroundimage>=backgroundimage.length) {i_backgroundimage=0}
timer=setTimeout("swapimages()",swapspeed) ;
}
}
window.onload=swapimages;
</Script>
<body id="id_body" style="FILTER: revealTrans(duration=2,transition=20)">
<marquee>abcabcabcabcabcabc</marquee>
</body>
</html>
≡≡≡≡≡ 评论(共 条)我要评论
 

Copyright 2004 酷酷小家园   Powered by 5dblog