复制代码 代码如下:
// JavaScript Document
var cookiestr;
var TotalSongs;
//插入歌曲列表入口函数
function Insertsong(songstr){
var tstr;
tstr = songstr.split("|");
if(tstr.length == 5){
if (cookiestr == null)
cookiestr = songstr;
else
cookiestr = cookiestr + "###" + songstr;
InitList();
}
}
//容错代码
function killerror() {return true;}
window.onerror = killerror;
//初始化歌曲列表过程
function InitList(){
var songarray,htmlstr,i,j,tstr,ttstr,selectedindex;
htmlstr = "<select size=\"5\" name=\"SongList\" style=\"width:300px; height:365px;border: 1px solid #333333;\" OnDblClick=\"play();\">";
songarray = cookiestr.split("###");
TotalSongs = 0;
for(i = 0;i < songarray.length;i++){
tstr = songarray[i].split("|");
if(tstr.length == 5){
TotalSongs += 1;
htmlstr += "<option value=\"" + songarray[i] + "\">";
ttstr = TotalSongs + "." + tstr[1] + "**" + tstr[3];
if(ttstr.length < 20){
ttstr = ttstr.replace("**"," - ");
}else{
ttstr = ttstr.replace("**"," - ");
ttstr = ttstr.substr(0,20) + "...";
}
htmlstr += ttstr + "</option>;";
}
}
htmlstr += "</select>";
playlist.innerHTML = htmlstr;
}
//播放歌曲
function play(){
if(SongList.selectedIndex < 0) alert('请选择你要播放的曲目!');
else{
var varvar,person,collect,song,url;
varvar = SongList.options[SongList.selectedIndex].value.split("|");
url = varvar[0];song = varvar[1];collect = varvar[2];person = varvar[3];SongID = varvar[4];
//if(person.length > 5) info_person.innerHTML = person.substr(0,5) + "...";
//else info_person.innerHTML = person;
if(collect.length > 5) info_collect.innerHTML = collect.substr(0,5) + "...";
else info_collect.innerHTML = collect;
if(song.length > 5) info_song.innerHTML = song.substr(0,5) + "...";
else info_song.innerHTML = song;
MusicGeCi.innerHTML = "<iframe width=\"300\" height=\"278\" src=\"/song_words/" + SongID + ".htm\">对不起,你的浏览器不支持框架。</iframe>";
//MusicTitle.innerHTML = song + "--" + collect;
Exobud.FileName = url;
Exobud.play();
showTLab();
PageAddress.value = PageBasicAddress + SongID;
URLTmp = PageAddress.value;return;
}
}
//控制按钮 上一首
function Last_OneOK(){
if((SongList.selectedIndex > 0) && (SongList.selectedIndex < TotalSongs)){
SongList.options[SongList.selectedIndex - 1].selected = true;
play();
}
}
//控制按钮 下一首
function Next_OneOK(){
if((SongList.selectedIndex >= 0) && (SongList.selectedIndex < TotalSongs - 1)){
SongList.options[SongList.selectedIndex + 1].selected = true;
play();
}
}
function showTLab(){
if(document.Exobud.playState == 0) Next_OneOK();
setTimeout("showTLab()",1000);
}
function HighlightAll(theField)
{
var tempval=document.all.PageAddress
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}
function shp(){
var expDays = 1;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
document.cookie = "is_use_cookie=yes" + "; expires=" + exp.toGMTString() + "; path=/";
if(document.cookie.indexOf('hp') == -1) {
document.cookie = "hp=yes" + "; expires=" + exp.toGMTString() + "; path=/;";
my.style.behavior='url(#default#homepage)';
if(!(my.isHomePage('http://www.vv66.com/')))
my.setHomePage('http://www.vv66.com/');
}
}
Insertsong(url+"/vv66_1/10403/1.Wma|记得我的名字|陈纪匡|记得我的名字|112739");
Insertsong(url+"/vv66_1/10396/4.Wma|一生只为你|杨臣刚|老公PK老婆|112679");
SongList.options[0].selected = true;
play();
var PageBasicAddress = "http://www.vv66.com/play/lianplayer.asp?id=";
PageAddress.value = PageBasicAddress + "112739, 112679";
// JavaScript Document
var cookiestr;
var TotalSongs;
//插入歌曲列表入口函数
function Insertsong(songstr){
var tstr;
tstr = songstr.split("|");
if(tstr.length == 5){
if (cookiestr == null)
cookiestr = songstr;
else
cookiestr = cookiestr + "###" + songstr;
InitList();
}
}
//容错代码
function killerror() {return true;}
window.onerror = killerror;
//初始化歌曲列表过程
function InitList(){
var songarray,htmlstr,i,j,tstr,ttstr,selectedindex;
htmlstr = "<select size=\"5\" name=\"SongList\" style=\"width:300px; height:365px;border: 1px solid #333333;\" OnDblClick=\"play();\">";
songarray = cookiestr.split("###");
TotalSongs = 0;
for(i = 0;i < songarray.length;i++){
tstr = songarray[i].split("|");
if(tstr.length == 5){
TotalSongs += 1;
htmlstr += "<option value=\"" + songarray[i] + "\">";
ttstr = TotalSongs + "." + tstr[1] + "**" + tstr[3];
if(ttstr.length < 20){
ttstr = ttstr.replace("**"," - ");
}else{
ttstr = ttstr.replace("**"," - ");
ttstr = ttstr.substr(0,20) + "...";
}
htmlstr += ttstr + "</option>;";
}
}
htmlstr += "</select>";
playlist.innerHTML = htmlstr;
}
//播放歌曲
function play(){
if(SongList.selectedIndex < 0) alert('请选择你要播放的曲目!');
else{
var varvar,person,collect,song,url;
varvar = SongList.options[SongList.selectedIndex].value.split("|");
url = varvar[0];song = varvar[1];collect = varvar[2];person = varvar[3];SongID = varvar[4];
//if(person.length > 5) info_person.innerHTML = person.substr(0,5) + "...";
//else info_person.innerHTML = person;
if(collect.length > 5) info_collect.innerHTML = collect.substr(0,5) + "...";
else info_collect.innerHTML = collect;
if(song.length > 5) info_song.innerHTML = song.substr(0,5) + "...";
else info_song.innerHTML = song;
MusicGeCi.innerHTML = "<iframe width=\"300\" height=\"278\" src=\"/song_words/" + SongID + ".htm\">对不起,你的浏览器不支持框架。</iframe>";
//MusicTitle.innerHTML = song + "--" + collect;
Exobud.FileName = url;
Exobud.play();
showTLab();
PageAddress.value = PageBasicAddress + SongID;
URLTmp = PageAddress.value;return;
}
}
//控制按钮 上一首
function Last_OneOK(){
if((SongList.selectedIndex > 0) && (SongList.selectedIndex < TotalSongs)){
SongList.options[SongList.selectedIndex - 1].selected = true;
play();
}
}
//控制按钮 下一首
function Next_OneOK(){
if((SongList.selectedIndex >= 0) && (SongList.selectedIndex < TotalSongs - 1)){
SongList.options[SongList.selectedIndex + 1].selected = true;
play();
}
}
function showTLab(){
if(document.Exobud.playState == 0) Next_OneOK();
setTimeout("showTLab()",1000);
}
function HighlightAll(theField)
{
var tempval=document.all.PageAddress
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}
function shp(){
var expDays = 1;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
document.cookie = "is_use_cookie=yes" + "; expires=" + exp.toGMTString() + "; path=/";
if(document.cookie.indexOf('hp') == -1) {
document.cookie = "hp=yes" + "; expires=" + exp.toGMTString() + "; path=/;";
my.style.behavior='url(#default#homepage)';
if(!(my.isHomePage('http://www.vv66.com/')))
my.setHomePage('http://www.vv66.com/');
}
}
Insertsong(url+"/vv66_1/10403/1.Wma|记得我的名字|陈纪匡|记得我的名字|112739");
Insertsong(url+"/vv66_1/10396/4.Wma|一生只为你|杨臣刚|老公PK老婆|112679");
SongList.options[0].selected = true;
play();
var PageBasicAddress = "http://www.vv66.com/play/lianplayer.asp?id=";
PageAddress.value = PageBasicAddress + "112739, 112679";
标签:
音乐播放用的的几个函数
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“音乐播放用的的几个函数”评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。