Ⅰ 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中显示的播放器,经过测试,可以正常播放。