<!-- http://JS.knowsky.com/ --> <!-- http://bbs.knowsky.com/--> <!-- 腳本說明:第一步:把如下代碼加入<body>區域中--> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var rand1 = 0; var useRand = 0; images = new Array; images[1] = new Image(); images[1].src = "/img/200406301.jpg"; images[2] = new Image(); images[2].src = "/img/200406302.jpg"; images[3] = new Image(); images[3].src = "/img/200406303.jpg"; images[4] = new Image(); images[4].src = "/img/200406304.jpg"; function swapPic() { var imgnum = images.length - 1; do { var randnum = Math.random(); rand1 = Math.round((imgnum - 1) * randnum) + 1; } while (rand1 == useRand); useRand = rand1; document.randimg.src = images[useRand].src; } // End --> </script> <a onClick="swapPic();"><img name="randimg" src="/img/200406301.jpg" tppabs="/School/UploadFiles_7810/201104/20110411202246667.jpg"></a><br> <font face="Verdana" size="-2">click image to change</font> </center> <!--第二步:把<body>區域中內容改為:--> <body bgcolor="#fef4d9" OnLoad="swapPic()">