[size=small][b]1 <param name="URL" value=" ">在value这里写上URL
2 或者函数控制URL[/b][/size]
2 或者函数控制URL[/b][/size]
<object id="Player" width=300 height=300
classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">
<param name="URL" value=" "> <!-- E:\娱乐\音乐\Wonder Girls-Nobody.mp3 -->
<param name="autoStart" value="0">
<param name="balance" value="0">
<param name="baseURL" value>
<param name="captioningID" value>
<param name="currentPosition" value="0">
<param name="currentMarker" value="0">
<param name="defaultFrame" value>
<param name="enabled" value="1">
<param name="enableErrorDialogs" value="0">
<param name="enableContextMenu" value="1">
<param name="fullScreen" value="0">
<param name="invokeURLs" value="1">
<param name="mute" value="0">
<param name="playCount" value="1">
<param name="rate" value="1">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="stretchToFit" value="0">
<param name="uiMode" value="full">
<param name="volume" value="100">
<param name="windowlessVideo" value="0">
</object>
<br>
<input name="radiobutton" type="radio" value="E:\娱乐\音乐\Wonder Girls-Nobody.mp3" onclick='addmedia(this.value)' />no body</br>
<input name="radiobutton" type="radio" value="E:\娱乐\音乐\蓝色多瑙河.mp" onclick='addmedia(this.value)' />蓝色多瑙河</br>
<div id="spanInfo">asdasdasdasdasd</div>
<SCRIPT LANGUAGE="javascript">
function addmedia(url) {
Player.settings.requestMediaAccessRights("full"); // 对本地播放列表的权限操作
clearlist();//清除列表
var playlist = Player.currentPlaylist;// 取得当前的播放列表
var currMedia = Player.newMedia(url);//新建一个指定URL的Media。
playlist.appendItem(currMedia);//添加录音
Player.controls.play();//开始播放
}
//清空播放列表
function clearlist() {
while (Player.currentPlaylist.count > 0) {
var item = Player.currentPlaylist
.item(Player.currentPlaylist.count - 1);
Player.currentPlaylist.removeItem(item); //从播放列表中删除项
}
}
</SCRIPT>
<SCRIPT language=javascript event=Error() for=Player>
alert("出错了!");
</SCRIPT>