窄欄 Xuite 隨機音樂+1對1專屬圖片音樂播放器




2008/03/30 00:54


窄欄 Xuite 隨機音樂+1對1專屬圖片播放器(二度空間)語法編輯


此語法不適合用在奇摩部落格,只能用在有支援HTML與JavaScript語法的部落格或個人網頁


此語法特別之處:可為每個音樂獨立配置專屬圖片(意思:曲名1有曲名1自己的圖片)


複製語法時,請用文字文件記事本轉貼成純文字,再貼上欄位中
























模式一



此模式的圖片網址,可來自不同的位址(圖片副檔名如為 .jpg,.gif就必須改成 .jpg)


 <table align="center" width="100%" height="100%" cellpadding="0" style="border:10px ridge #ffccff;/*外框線*/" bgcolor="#CCCCCC" background=背景圖片網址.gif>
<tr>
<td align="center">
<center>
<!--圖片數量依序自行增加-->
<!--圖片網址自行加入,圖片顯示的寬高建議設定一致-->
<!--id依序自行增加-->
<!--藍底白字為音樂 id -->
<!--音樂與圖片數量同步增加→Math.floor(5*←跟著增加-->
<script language="JavaScript">
<!--
var random=Math.floor(5*Math.random()+1)
var str
if (random==1){music="OTA2Njk1"; img="<img src=圖片網址.gif width=145 height=200>"; str="曲名1";}
if (random==2){music="OTA3MDMz"; img="<img src=圖片網址.gif width=145 height=200>"; str="曲名2";}
if (random==3){music="OTA0Mjc1"; img="<img src=圖片網址.gif width=145 height=200>"; str="曲名3";}
if (random==4){music="ODk1NzQy"; img="<img src=圖片網址.gif width=145 height=200>"; str="曲名4";}
if (random==5){music="ODk0NDA3"; img="<img src=圖片網址.gif width=145 height=200>"; str="曲名5";}
document.write(''+img+'')
document.write('<br>')
document.write("<font size=3 color=#ff0000>"+str+"</font>")
document.write('<br>')

document.write('<embed src=http://vlog.xuite.net/vlog/swf/lite.swf?media='+music+'&amp;ar=1&amp;as=1 width=145 height=50>')
-->
</script>
</center></td>
</tr>
</table>
不顯示曲名,可將以上↑如下的↓部份移除
document.write("<font size=3 color=#ff0000>"+str+"</font>")
document.write('<br>')

模式二



此模式的圖片網址必須是相同的資料夾網址(圖片副檔名如為 .jpg,.gif就必須改成 .jpg)


<table align="center" width="100%" height="100%" cellpadding="0" style="border:10px ridge #ffccff;/*外框線*/" bgcolor="#CCCCCC" background=背景圖片網址.gif>
<tr>
<td align="center">
<center>
<!--圖片檔案依序自行增加-->
<!--圖片檔案自行加入,圖片顯示的寬高建議設定一致-->
<!--id依序自行增加-->
<!--藍底白字為音樂 id -->
<!--音樂與圖片數量同步增加→Math.floor(5*←跟著增加-->
<script language="JavaScript">
<!--
var random=Math.floor(5*Math.random()+1)
var str
if (random==1){music="OTA2Njk1"; img="圖片檔案.gif width=145 height=200"; str="曲名1";}
if (random==2){music="OTA3MDMz"; img="圖片檔案.gif width=145 height=200"; str="曲名2";}
if (random==3){music="OTA0Mjc1"; img="圖片檔案.gif width=145 height=200"; str="曲名3";}
if (random==4){music="ODk1NzQy"; img="圖片檔案.gif width=145 height=200"; str="曲名4";}
if (random==5){music="ODk0NDA3"; img="圖片檔案.gif width=145 height=200"; str="曲名5";}
document.write('<img src=圖片資料夾網址/'+img+'>')
document.write('<br>')
document.write("<font size=3 color=#ff0000>"+str+"</font>")
document.write('<br>')

document.write('<embed src=http://vlog.xuite.net/vlog/swf/lite.swf?media='+music+'&amp;ar=1&amp;as=1 width=145 height=50>')
-->
</script>
</center></td>
</tr>
</table>
不顯示曲名,可將以上↑如下的↓部份移除
document.write("<font size=3 color=#ff0000>"+str+"</font>")
document.write('<br>')
圖片資料夾網址,例如:http://px1234567.t35.com/gif/←藍底白字標示為資料夾
圖片檔案,例如:black009.gif
當語法執行時,網址自動在後台組合產生為:http://px1234567.t35.com/gif/black009.gif 連結

尋找音樂 id 延伸教學:點→Xuite日誌音樂盒製作
arrow
arrow
    全站熱搜

    牡麗三郎 發表在 痞客邦 留言(0) 人氣()