1. 程式人生 > >如何在網站網頁中新增音樂程式碼

如何在網站網頁中新增音樂程式碼

告訴你多種格式檔案的詳細使用程式碼。 
   width_num——指定一個作為寬度的數字; 
   height_num——指定一個作為高度的數字; 
    1.mp3
    <embed controller="true" width="width_num" height="height_num"  
src="音樂檔案和地址" border="0" pluginspage=
"http://www.apple.com/quicktime/download/indext.html"></embed> 
    2.mid 
    <embed src="音樂檔案和地址" type="audio/midi" hidden="false" autostart="true"  

loop="true" height=height_num width=width_num></embed> 
    3.avi
    <embed src="音樂檔案和地址" border="0" width="width_num" height=
"height_num" type="application/x-mplayer2"></embed> 
    4.flash
    <embed src="音樂檔案和地址" pluginspage=
"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="width_num" height="height_num" play="true" loop="true" 

quality="high" scale="showall" menu="true"></embed> 
    5.rm
    <OBJECT>" height="height_num">
    <PARAM NAME="CONTROLS" VALUE="ImageWindow">
    <PARAM NAME="AUTOSTART" Value="true">
    <PARAM NAME="SRC" VALUE="音樂檔案和地址">
    <embed height="高" width="寬" controls="ImageWindow"  

src="音樂檔案和地址" type=
"audio/x-pn-realaudio-plugin" autostart="true" nolabels="0" 
autogotourl="-1"></OBJECT> 
    6.mpg
    <embed src="音樂檔案和地址" border="0" width="width_num" 
height="height_num" type="application/x-mplayer2"></embed> 
    7.mov
    <embed controller="true" width="width_num" height="height_num" 
src="音樂檔案和地址" border="0" pluginspage=
"http://www.apple.com/quicktime/download/indext.html"></embed> 
    8.上面的都是使用播放器的,如果只是想播放背景音樂的話可以使用如下簡單語句:
    <bgsound src="音樂檔案和地址" loop=1>
    loop後面是迴圈的次數,-1代表無限迴圈。 如何在網站網頁中新增音樂