隨機更換圖片

檔案下載 : 1  2  3  4

將下列程式碼複製至<head>程式碼</head>區內

<script Language="JavaScript">
tips = new Array(4)
tips[0] = "<img src=026.gif>"
tips[1] = "<img src=027.gif>"
tips[2] = "<img src=028.gif>"
tips[3] = "<img src=029.gif>"
index = Math.floor(Math.random() * tips.length)
document.write("<center>" + tips[index] + "</center><p>")
</script>