Ⅰ dreamweaver怎樣更改音樂播放器的樣式
<script type="text/javascript">
var j=0;
//初始化播放列表
var list=['Fighting in built-up areas.wma','Decadence-Disturbed.mp3','I』m No Good.wma','Glam Bucket--Underworld.mp3','Fight sounds part 1--Circlesquare.mp3','Indigo Children--Puscifer.mp3','Mighty Micro People--Amon Tobin.mp3','Momma Sed--Puscifer.mp3','Shunt--Recoil.mp3','Signs of life.wma','Washing Up.wma','No Love.wma','Electrotumbao--The Pinker Tones.mp3'];
function toPlay(i)
{
j=i;
if(i<0){i=0;}
if(i>12){i=12}
player.url="music/"+list[i];
player.settings.autoStart = true;
player.controls.play();
}
function playerinit()
{
if(window.screen.width == 1024 && window.screen.height == 640 || window.screen.height == 768)
{
player.url="music/"+list[0];
j=0;
player.settings.autoStart = true;
player.controls.play();
}else{
alert('為了有最好的瀏覽效果,請將您的解析度設置為1024*640/1024*768');
}
}
//播放
function play()
{
// if (player.controls.isavailable('play'))
// {
player.controls.play();
//state=setInterval("updatetime()",1000);
// }
}
//暫停
function pause()
{
// if (player.controls.isavailable('pause'))
// {
player.controls.pause();
//clearInterval(state);
// }
}
//停止
function stop()
{
if (player.controls.isavailable('stop'))
{
player.controls.stop();
//clearInterval(state);
playerinfo.innerHTML = "停止";
}
}
//前首
function previous()
{
toPlay(j-1);
}
//後首
function next()
{
toPlay(j+1);
}
////?
//function step()
//{
//if (player.controls.isavailable( 'step' ))
//player.controls.step( 1 );
//}
////音量-
//function voldown()
//{
//if ( player.settings.volume < 5 )
//{
//player.settings.volume = 0;
//playerinfo.innerHTML = "0";
//}
//else
//{
//player.settings.volume -= 5;
//playerinfo.innerHTML = player.settings.volume;
//}
//}
////音量+
//function volup()
//{
//if ( player.settings.volume > 95 )
//{
//player.settings.volume = 100;
//playerinfo.innerHTML = "100";
//}
//else
//{
//player.settings.volume += 5;
//playerinfo.innerHTML = player.settings.volume;
//}
//}
////靜音
//function mute()
//{
//player.settings.mute = !player.settings.mute;
//}
////聲道
//function balance()
//{
//switch (player.settings.balance)
//{
//case 0:
//player.settings.balance = 100;
//playerinfo.innerHTML = '左聲道';
//break;
//case 100:
//player.settings.balance = -100;
//playerinfo.innerHTML = '右聲道';
//break;
//case -100:
//player.settings.balance = 0;
//playerinfo.innerHTML = '全聲道';
//break;
//default :
//player.settings.balance = 0;
//playerinfo.innerHTML = '全聲道';
//break;
//}
//}
////更新時間
//function updatetime()
//{
//playerinfo.innerHTML = player.controls.currentPositionString + " | " + player.currentMedia.rationString;
//}
</script>
<script type="text/javascript">
function showDIV()
{
var div=document.getElementById('music');
if(document.getElementById('show').name=="show")
{
div.style.pixelTop+=15;
if(div.style.pixelTop>=0)
{
div.style.pixelTop=0;
clearTimeout(tt);
document.getElementById('show').name="hidden";
document.getElementById('show').innerHTML="隱藏歌曲列表";
}else
{
var tt=setTimeout('showDIV()',1);
}
}else
{
div.style.pixelTop-=15;
if(div.style.pixelTop<=-280)
{
div.style.pixelTop=-283;
clearTimeout(tt);
document.getElementById('show').name="show";
document.getElementById('show').innerHTML="顯示歌曲列表";
}else
{
var tt=setTimeout('showDIV()',1);
}
}
}
</script>
<div id="music" style="position:absolute;left:154px;top:-280px;;width:117px; height:270; z-index:50; font-size:12px;">
<table width="540" height="270" border="0" background="pic/Icon/bg_grad.jpg" class="listBorder">
<tr>
<td height="17" colspan="2" align="center"> 播放列表(單擊試聽)</td>
<td width="356" height="238" rowspan="14" align="center" style="margin:0px;padding:0px;"><object id="player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="356" height="260">
<param name="autoStart" value="false">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="currentMarker" value="0">
<param name="enableContextMenu" value="true">
<param name="enableErrorDialogs" value="false">
<param name="enabled" value="true">
<param name="fullScreen" value="false">
<param name="invokeURLs" value="false">
<param name="mute" value="true">
<param name="playCount" value="1">
<param name="rate" value="1">
<param name="uiMode" value="none">
<param name="volume" value="100">
<embed src="music/Good as Gold.wma" width="356" height="260" autostart="false" balance="0" currentposition="0" currentmarker="0" enablecontextmenu="true" enableerrordialogs="false" enabled="true" fullscreen="false" invokeurls="false" mute="true" playcount="1" rate="1" uimode="none" volume="100"></embed>
</object></td>
</tr>
<tr>
<td width="24" height="18" align="center"> 1</td>
<td width="144" height="18" align="left"><a class="music" href="#" onClick="toPlay(11)">No Love</a></td>
</tr>
<tr>
<td height="18" align="center"> 2</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(10)">Washing Up</a></td>
</tr>
<tr>
<td height="18" align="center"> 3</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(2)">I』m No Good</a></td>
</tr>
<tr>
<td height="18" align="center"> 4</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(8)">Shunt--Recoil</a></td>
</tr>
<tr>
<td height="18" align="center"> 5</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(4)">Fight sounds</a></td>
</tr>
<tr>
<td height="18" align="center"> 6</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(5)">Indigo Children</a></td>
</tr>
<tr>
<td height="18" align="center"> 7</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(6)">Mighty Micro People</a></td>
</tr>
<tr>
<td height="18" align="center"> 8</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(7)">Momma Sed</a></td>
</tr>
<tr>
<td height="18" align="center"> 9</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(3)">Glam Bucket</a></td>
</tr>
<tr>
<td height="18" align="center"> 10</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(9)">Signs of life</a></td>
</tr>
<tr>
<td height="18" align="center"> 11</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(1)">Decadence</a></td>
</tr>
<tr>
<td height="18" align="center"> 12</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(0)">Fighting in built</a></td>
</tr>
<tr>
<td height="18" align="center"> 13</td>
<td height="18" align="left"><a class="music" href="#" onClick="toPlay(12)">Electrotumbaos</a></td>
</tr>
<tr>
<td height="18" colspan="3">
<a href="#" class="music" onClick="play()">播放</a>
<a href="#" class="music" onClick="pause()">暫停</a>
<a href="#" class="music" onClick="previous()">上一首</a>
<a href="#" class="music" onClick="next()">下一首</a>
<a href="#" class="music" id="show" name="show" onClick="showDIV()">顯示歌曲列表</a>
</td>
</tr>
</table>
</div>
老早以前寫的了,你可以改成動態讀取歌曲名及歌曲列表
Ⅱ dreamweaver怎麼添加音樂自動播放的那種
代碼一、<BGSOUND src="音樂文件網址" loop=infinite>
代碼二、<DIV><OBJECT id=videowindow1 height=185 width=179 classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6><PARAM NAME="URL" VALUE="音樂文件網址"><PARAM NAME="playCount" VALUE="infinite"><PARAM NAME="autoStart" VALUE="1"><PARAM NAME="volume" VALUE="50"><PARAM NAME="uiMode" VALUE="full"><PARAM NAME="stretchToFit" VALUE="1"></OBJECT></DIV>
代碼說明:
兩種代碼都可以為博客添加音樂,它們的分別在於:
1、加入背景音樂,播放器不會顯示在頁面上;
2、加入播放器,使用播放器播放背景音樂。
代碼2中的以下部分可以自行替換:
1、音樂文件網址可以替換上自己喜歡的音樂文件網址;
2、語句<PARAM NAME="playCount" VALUE="infinite">的「infinite」可以替換為數字,表示重復播放多少次,如果不更改表示永久循環播放;
3、語句<PARAM NAME="autoStart" VALUE="1">表示是否自動播放,更改為"0"時不會自動播放,"1"的時候是自動播放;
4、height和width兩個屬性可以改變播放器的大小。
如果音樂文件在你的根文件夾內,那你就可以直接在上述代碼中的「音樂文件網址」替換為你的文件全稱就可以了,比如音樂文件為,haoting.mp3 那你就在上述代碼中的音樂文件網址中輸入haoting.mp3就可以了
Ⅲ Dreamweaver8怎樣才能做音樂播放器
要隱藏的還是有樣式的,有樣式的話你可以到站長天空那裡有現成的代碼,如果是隱藏的話 鑲嵌在網頁中的各種播放器代碼 1.avi格式 <object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"> <param name="ShowDisplay" value="0"> <param name="ShowControls" value="1"> <param name="AutoStart" value="1"> <param name="AutoRewind" value="0"> <param name="PlayCount" value="0"> <param name="Appearance value="0 value="""> <param name="BorderStyle value="0 value="""> <param name="MovieWindowHeight" value="240"> <param name="MovieWindowWidth" value="320"> <param name="FileName" value="文件路徑"> <embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="文件路徑" src="Mbar.avi"> </embed> </object> 2.mpg格式 <object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" id="ActiveMovie1" width="239" height="250"> <param name="Appearance" value="0"> <param name="AutoStart" value="-1"> <param name="AllowChangeDisplayMode" value="-1"> <param name="AllowHideDisplay" value="0"> <param name="AllowHideControls" value="-1"> <param name="AutoRewind" value="-1"> <param name="Balance" value="0"> <param name="CurrentPosition" value="0"> <param name="DisplayBackColor" value="0"> <param name="DisplayForeColor" value="16777215"> <param name="DisplayMode" value="0"> <param name="Enabled" value="-1"> <param name="EnableContextMenu" value="-1"> <param name="EnablePositionControls" value="-1"> <param name="EnableSelectionControls" value="0"> <param name="EnableTracker" value="-1"> <param name="Filename" value="../../../mpeg/halali.mpg" valuetype="ref"> <param name="FullScreenMode" value="0"> <param name="MovieWindowSize" value="0"> <param name="PlayCount" value="1"> <param name="Rate" value="1"> <param name="SelectionStart" value="-1"> <param name="SelectionEnd" value="-1"> <param name="ShowControls" value="-1"> <param name="ShowDisplay" value="-1"> <param name="ShowPositionControls" value="0"> <param name="ShowTracker" value="-1"> <param name="Volume" value="-480"> </object> 3.smi格式 <OBJECT id=RVOCX classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=240 height=180> <param name="_ExtentX" value="6350"> <param name="_ExtentY" value="4763"> <param name="AUTOSTART" value="-1"> <param name="SHUFFLE" value="0"> <param name="PREFETCH" value="0"> <param name="NOLABELS" value="-1"> <param name="SRC" value="rm.rm"> <param name="CONTROLS" value="ImageWindow"> <param name="CONSOLE" value="console1"> <param name="LOOP" value="0"> <param name="NUMLOOP" value="0"> <param name="CENTER" value="0"> <param name="MAINTAINASPECT" value="0"> <param name="BACKGROUNDCOLOR" value="#000000"><embed src="real.smi" type="audio/x-pn-realaudio-plugin" console="Console1" controls="ImageWindow" height="180" width="240" autostart="true"></OBJECT> 4.rm格式 <OBJECT ID=video1 CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT=288 WIDTH=352> <param name="_ExtentX" value="9313"> <param name="_ExtentY" value="7620"> <param name="AUTOSTART" value="0"> <param name="SHUFFLE" value="0"> <param name="PREFETCH" value="0"> <param name="NOLABELS" value="0"> <param name="SRC" value=" rtsp://203.207.131.35/vod/dawan-a.rm";;;;> <param name="CONTROLS" value="ImageWindow"> <param name="CONSOLE" value="Clip1"> <param name="LOOP" value="0"> <param name="NUMLOOP" value="0"> <param name="CENTER" value="0"> <param name="MAINTAINASPECT" value="0"> <param name="BACKGROUNDCOLOR" value="#000000"><embed SRC type="audio/x-pn-realaudio-plugin" CONSOLE="Clip1" CONTROLS="ImageWindow" HEIGHT="288" WIDTH="352" AUTOSTART="false"> </OBJECT> 華哥2005-7-5 14:37 5.wmv格式 <object id="NSPlay" width=200 height=180 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase=" http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" align="right" hspace="5"> <!-- ASX File Name --> <param name="AutoRewind" value=1> <param name="FileName" value="xxxxxx.wmv"> <!-- Display Controls --> <param name="ShowControls" value="1"> <!-- Display Position Controls --> <param name="ShowPositionControls" value="0"> <!-- Display Audio Controls --> <param name="ShowAudioControls" value="1"> <!-- Display Tracker Controls --> <param name="ShowTracker" value="0"> <!-- Show Display --> <param name="ShowDisplay" value="0"> <!-- Display Status Bar --> <param name="ShowStatusBar" value="0"> <!-- Diplay Go To Bar --> <param name="ShowGotoBar" value="0"> <!-- Display Controls --> <param name="ShowCaptioning" value="0"> <!-- Player Autostart --> <param name="AutoStart" value=1> <!-- Animation at Start --> <param name="Volume" value="-2500"> <param name="AnimationAtStart" value="0"> <!-- Transparent at Start --> <param name="TransparentAtStart" value="0"> <!-- Do not allow a change in display size --> <param name="AllowChangeDisplaySize" value="0"> <!-- Do not allow scanning --> <param name="AllowScan" value="0"> <!-- Do not show contect menu on right mouse click --> <param name="EnableContextMenu" value="0"> <!-- Do not allow playback toggling on mouse click --> <param name="ClickToPlay" value="0"> </object>
Ⅳ dreamweaver音樂自動播放的參數是
代碼一、<BGSOUND src="音樂文件網址" loop=infinite>
代碼二、<DIV><OBJECT id=videowindow1 height=185 width=179 classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6><PARAM NAME="URL" VALUE="音樂文件網址"><PARAM NAME="playCount" VALUE="infinite"><PARAM NAME="autoStart" VALUE="1"><PARAM NAME="volume" VALUE="50"><PARAM NAME="uiMode" VALUE="full"><PARAM NAME="stretchToFit" VALUE="1"></OBJECT></DIV>
代碼說明:
兩種代碼都可以為博客添加音樂,它們的分別在於:
1、加入背景音樂,播放器不會顯示在頁面上;
2、加入播放器,使用播放器播放背景音樂。
代碼2中的以下部分可以自行替換:
1、音樂文件網址可以替換上自己喜歡的音樂文件網址;
2、語句<PARAM NAME="playCount" VALUE="infinite">的「infinite」可以替換為數字,表示重復播放多少次,如果不更改表示永久循環播放;
3、語句<PARAM NAME="autoStart" VALUE="1">表示是否自動播放,更改為"0"時不會自動播放,"1"的時候是自動播放;
4、height和width兩個屬性可以改變播放器的大小。
上面是插入背景音樂的代碼,代碼一是直接自動播放的
代碼二中有相應的播放器, 語句<PARAM NAME="autoStart" VALUE="1">表示是否自動播放,更改為"0"時不會自動播放,"1"的時候是自動播放
Ⅳ 關於用dreamweaver做的網頁中插入音樂播放器的歌曲切換
可以這樣
<object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" id="MediaPlayer1" width="0" height="0">
<param name="AutoStart" value="-1">
<param name="Filename" value="A.mp3">
</object>
<input type="button" value="A" onClick="document.MediaPlayer1.filename='A.mp3'">
<input type="button" value="B" onClick="document.MediaPlayer1.filename='B.mp3'">
Ⅵ dreamweaver8.0插入這種音樂播放器怎麼做
這個是音樂播放器吧?
最基本的代碼
<embed src="【flash地址】" width="468" height="60"></embed>
這個是最簡單的了
不過為了兼容性,還需要更加復雜些的方法
例如
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400">
<param name="movie" value="【flash地址】">
<param name="quality" value="high">
<embed src="【flash地址】" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550"
height="400"></embed>
</object>
Ⅶ 用DW做的音樂播放器,如何能同一個播放器播放列表所有的歌曲
可以這復樣
<object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" id="MediaPlayer1" width="0" height="0">
<param name="AutoStart" value="-1">
<param name="Filename" value="A.mp3">
</object>
<input type="button" value="A" onClick="document.MediaPlayer1.filename='A.mp3'">
<input type="button" value="B" onClick="document.MediaPlayer1.filename='B.mp3'">
要編寫播制放代碼。在虛擬空間中加一個播放列表的插件。
Ⅷ 怎樣在Dreamweaver製作的網頁中放入音樂播放器
插入--〉媒體--〉插件
選擇那個文件就行了
Ⅸ dreamweaver怎麼實現一個按鈕播放和暫停音樂,求代碼
======將下面的JS代碼生成的字元串content的內容放在html中就是一個音樂播放器,並且能夠播放音樂。為了兼容,下面的寫得比較亂,可以不用JS,整理一下,直接放HTML中也行。
音樂播放器標簽的JS代碼:
varmusicSrc="../music/1.mp3";
varbower=window.navigator.userAgent;
if(bower.indexOf("MSIE6")!=-1||bower.indexOf("MSIE7")!=-1||bower.indexOf("MSIE8")!=-1){
content="<embedid="music1"src=""+musicSrc+""style="width:290px"autostart=trueloop=truehiddle=true>";
}elseif(bower.indexOf("Firefox")!=-1){
content="<audioid="music1"src=""+musicSrc+""style="width:290px"=120px><p>小樂會唱歌,但您的瀏覽器版本過低,不支持播放小樂的歌聲。~~~~(>_<)~~~~</p></audio>";
}else{
content="<audioid="music1"src=""+musicSrc+""style="width:290px"autoplaycontrolslooppreload><p>小樂會唱歌,但您的瀏覽器版本過低,不支持播放小樂的歌聲。~~~~(>_<)~~~~</p></audio>";
}
=====通過JS暫停音樂播放器的JS代碼如下:
varaudio=document.getElementById('music1');
if(audio!==null){
//檢測播放是否已暫停.audio.paused在播放器播放時返回false.<spanstyle="font-family:Arial,Helvetica,sans-serif;">在播放器暫停時返回true</span>
if(!audio.paused)
{
audio.pause();//這個就是暫停//audio.play();//這個就是播放
}
}
======你可以參考下
Ⅹ Dreamweaver裡面怎麼添加音樂播放器背景音樂
1、首先在在站點中新建HTML項目;
2、選擇Dreamweaver的「設計」窗口,插入—布局對象—Div標簽。在隨後跳出的「插入div標簽」對話框中直接點擊「確定」按鈕;
3、刪除div標簽中的文字內容,再次進行:插入—媒體—插件操作;
4、你可以將音樂文件放如你已經創建好的站點中,選擇你要插入的音樂文件,點擊「確定」;彈出提示窗口後同樣選擇「確定」;
5、成功插入後,選中音樂插件,在頁面下方的屬性欄中進行設置,如寬度和高度等;
6、設置屬性完成後可以對網頁進行預覽了,點擊頁面上方球形按鈕,選擇在IE中進行預覽,並根據提示將網頁保存到站點中;
7、在IE中選擇「允許阻止的內容」,並選擇運行活動內容;彈出安全警告選擇「是」;
8、可以看到IE中顯示的播放器,經過測試,可以正常播放。