play1=document.getElementById("play1");
play2=document.getElementById("play2");
play3=document.getElementById("play3");
play=[play1,play2,play3];
functionrotate(){
vardeg=0;
flag=1;
timer=setInterval(function(){
image.style.transform="rotate("+deg+"deg)";
deg+=5;
if(deg>360){
deg=0;
}
},30);
}
functionimagePause(){
clearInterval(timer);
flag=0;
}
functionjindutiao(){
//获取当前歌曲的歌长
varlenth=play[index].duration;
timer1=setInterval(function(){
cur=play[index].currentTime;//获取当前的播放时间
fillbar.style.width=""+parseFloat(cur/lenth)*300+"px";
},50)
}
function reducejindutiao(){
clearInterval(timer1);
fillbar.style.width="0";
}
function addtime(){
timer2=setInterval(function(){
cur=parseInt(play[index].currentTime);//秒数
vartemp=cur;
minute=parseInt(temp/60);
if(cur%60<10){
time.innerHTML=""+minute+":0"+cur%60+"";
}else{
time.innerHTML=""+minute+":"+cur%60+"";
}
},1000);
}
function adjust(e){
var bar=e.target;
var x=e.offsetX;
varlenth=play[index].duration;
fillbar.style.width=x+"px";
play[index].currentTime=""+parseInt(x*lenth/300)+"";
play[index].play();
}
function changeVolume(e){
var x=e.offsetX+20;
play[index].volume=parseFloat(x/200)*1;
//改变按钮的位置
volume3.style.left=""+x+"px";
}
functionshunxu(e){
var img=e.target;
img1.style.border="";
img.style.border="1pxsolid red";
clearInterval(suijiplay);
shunxuplay=setInterval(function(){
if(play[index].ended){
add();
}
},1000);
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有