步驟一 :
複製此
圖片檔案必須與程式碼網頁放在同的資料夾內.
步驟二 :
將以下程式碼複製 , 貼在網頁原始檔HTML <body> 之內 .
onload="setTimeout('timer()', 5)"
步驟三 :
將以下程式碼複製 , 貼在網頁原始檔HTML <body> 與 </body> 之間 .
<script language="JavaScript">
<!--
function timer()
{
var y
y = chara1.style.posTop + 5
if(y > document.body.clientHeight*2) y = 0
chara1.style.posLeft = 100 + Math.sin(y/240) * 75
chara1.style.posTop = y
y = chara2.style.posTop + 7
if(y > document.body.clientHeight*2) y = 0
chara2.style.posLeft = 160 + Math.sin(y/120) * 75
chara2.style.posTop = y
y = chara3.style.posTop + 8
if(y > document.body.clientHeight*2) y = 0
chara3.style.posLeft = 80 + Math.sin(y/350) * 100
chara3.style.posTop = y
y = chara4.style.posTop + 9
if(y > document.body.clientHeight*2) y = 0
chara4.style.posLeft = 230 + Math.sin(y/90) * 120
chara4.style.posTop = y
y = chara5.style.posTop + 7
if(y > document.body.clientHeight*2) y = 0
chara5.style.posLeft = 300 + Math.sin(y/180) * 220
chara5.style.posTop = y
y = chara6.style.posTop + 10
if(y > document.body.clientHeight*2) y = 0
chara6.style.posLeft = 360 + Math.sin(y/350) * 180
chara6.style.posTop = y
y = chara7.style.posTop + 7
if(y > document.body.clientHeight*2) y = 0
chara7.style.posLeft = 500 + Math.sin(y/200) * 220
chara7.style.posTop = y
y = chara8.style.posTop + 8
if(y > document.body.clientHeight*3) y = 0
chara8.style.posLeft = 570 + Math.sin(y/100) * 180
chara8.style.posTop = y
setTimeout("timer()", 50)
}
//-->
</script>
<img src="h02.GIF" width="35" height="32"
id="chara1" style="position: absolute; left: 100; top: 50"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara2" style="position: absolute; left: 200; top: 150"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara3" style="position: absolute; left: 300; top: 100"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara4" style="position: absolute; left: 400; top: 250"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara5" style="position: absolute; left: 500; top: 200"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara6" style="position: absolute; left: 600; top: 350"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara7" style="position: absolute; left: 700; top: 300"
naturalsizeflag="0"> <img src="h02.GIF" width="35" height="32"
id="chara8" style="position: absolute; left: 800; top: 400"
naturalsizeflag="0">