網頁中亂數載入.swf檔
<script language="JavaScript" type="text/JavaScript"><!-- Random Flash Begin //-->
FlashFiles = new Array("@@Flash1.swf","@@Flash2.swf", "@@Flash3.swf")
imgCt = FlashFiles.length
function chooseFlash(){
if (document.images){
randomNum = Math.floor((Math.random() * imgCt))
document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="myFlashFile" width="@@Your Files Width" height="@@Your Files Height" menu="false" id="myFlashFile">')
document.writeln('<param name="movie" value="' + FlashFiles + '">')
document.writeln('<param name="quality" value="high">')
document.writeln('<param name="menu" value="false">')
document.writeln('<embed src="' + FlashFiles + '" width="@@Your Files Width" height="@@Your Files Height" quality="high" menu"flase" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="myFlashFile"></embed>')
document.writeln('</object>')
}
}
<!-- Random Flash End //-->
</script>
在插入點加入
<script>chooseFlash()</script>
頁:
[1]