窄欄隨機換圖+ Xuite 隨機音樂播放器(二度空間)語法編輯
此語法不適合用在奇摩部落格,只能用在有支援HTML與JavaScript語法的部落格或個人網頁
複製語法時,請用文字文件記事本轉貼成純文字,再貼上欄位中
模式一 |
此模式的圖片網址,可來自不同的位址(圖片副檔名如為 .jpg,.gif就必須改成 .jpg) |
<table align="center" width="100%" height="100%" cellpadding="0" style="border:10px ridge #ffccff;/*外框線*/" background=背景圖片網址.gif> <tr> <td align="center"> <center> <!--圖片數量依序自行增加--> <!--圖片網址自行加入,圖片顯示的寬高建議設定一致--> <script language="JavaScript"> <!-- tips = new Array() tips[0] = "<img src=圖片網址.gif height=200 width=145>" tips[1] = "<img src=圖片網址.gif height=200 width=145>" tips[2] = "<img src=圖片網址.gif height=200 width=145>" tips[3] = "<img src=圖片網址.gif height=200 width=145>" tips[4] = "<img src=圖片網址.gif height=200 width=145>" index = Math.floor(Math.random() * tips.length) document.write(''+ tips[index] +'') --> </script> <br> <!--id依序自行增加--> <!--藍底白字為音樂 id --> <script language="JavaScript"> <!-- var bSound = new Array(); bSound[0] = "OTA2Njk1"; bSound[1] = "OTA3MDMz"; bSound[2] = "OTA0Mjc1"; bSound[3] = "ODk1NzQy"; bSound[4] = "ODk0NDA3"; x = Math.floor(Math.random()*bSound.length); document.write('<embed src=http://vlog.xuite.net/vlog/swf/lite.swf?media='+bSound[x]+'&ar=1&as=1 width=145 height=50>') --> </script> </td> </tr> </table> |
模式二 |
此模式的圖片網址必須是相同的資料夾網址(圖片副檔名如為 .jpg,.gif就必須改成 .jpg) |
<table align="center" width="100%" height="100%" cellpadding="0" style="border:10px ridge #ffccff;/*外框線*/" background=背景圖片網址.gif> <tr> <td align="center"> <center> <!--圖片檔案依序自行增加--> <!--圖片檔案自行加入,圖片顯示的寬高建議設定一致--> <script language="JavaScript"> <!-- tips = new Array() tips[0] = "圖片檔案.gif height=200 width=145" tips[1] = "圖片檔案.gif height=200 width=145" tips[2] = "圖片檔案.gif height=200 width=145" tips[3] = "圖片檔案.gif height=200 width=145" tips[4] = "圖片檔案.gif height=200 width=145" index = Math.floor(Math.random() * tips.length) document.write('<img src=圖片資料夾網址/'+ tips[index] +'>') --> </script> <br> <!--id依序自行增加--> <!--藍底白字為音樂 id --> <script language="JavaScript"> <!-- var bSound = new Array(); bSound[0] = "OTA2Njk1"; bSound[1] = "OTA3MDMz"; bSound[2] = "OTA0Mjc1"; bSound[3] = "ODk1NzQy"; bSound[4] = "ODk0NDA3"; x = Math.floor(Math.random()*bSound.length); document.write('<embed src=http://vlog.xuite.net/vlog/swf/lite.swf?media='+bSound[x]+'&ar=1&as=1 width=145 height=50>') --> </script> </td> </tr> </table> |
圖片資料夾網址,例如:http://px1234567.t35.com/gif/←藍底白字標示為資料夾 圖片檔案,例如:black009.gif 當語法執行時,網址自動在後台組合產生為:http://px1234567.t35.com/gif/black009.gif 連結 |
尋找音樂 id 延伸教學:點→Xuite日誌音樂盒製作