手机版

基于框架实现音乐播放试听列表

时间:2021-11-04 来源:互联网 编辑:宝哥软件园 浏览:

本文为大家分享了框架实现的音乐播放试听列表,可以实现播放,暂停,自动获取音频路径功能,具体内容如下

1.html文件

!DOCTYPE html html head meta http-equiv=' Content-Type ' Content=' text/html;charset=UTF-8 '标题音乐播放试听列表/title/head body脚本src=' http :http://libs。百度。com/jquery/2。0 .0/jquery。量滴js/script div class=' modal-content ' id=' music _ list _ box ' div class=' row music _ list _ Li ' id=' music _ list _ Li _ height ' style=' div class=' col-xs-12 ' ol class=' list-unstyle user _ music _ list _ ol ' id=' play _ list _ ol '你的浏览器不支持音频播放/audio Li class=' user _ music _ list '标签音乐名称1/标签a href=' # ' id='音乐名称1 ' class=' user _ doplay ' name=' stopped ' img src=' http :http://sandbox。 runjs。cn/uploads/RS/424/shsayjwv/play。png/a/Li class=' user _ music _ list '标签音乐名称2/标签a href=' # ' id=' music name '-播放/暂停-/div/div/div/body/html 2。快跑。射流研究…

////@ author FUCMLIF//@ date 2016/4/6//jQuery(' a . user _ doplay ').单击(函数(){ var x=document。getelementbyid(' MyAudio ');if (x。暂停){ jQuery('a.user_doplay ').查找(' img ').attr('src ',' http://沙盒。runjs。cn/uploads/RS/424/shsayjwv/play。png ');jQuery(这个)。查找(' img ').attr('src ',' http://沙盒。runjs。cn/uploads/RS/424/shsayjwv/stop。png ');jQuery(这个)。attr('name ',' playing ');x . play();//播放} else if (x.play jQuery(this)).attr(' name ')==' stopped '){ jQuery(' # MyAudio ').attr('src ',jQuery(this).attr(' id ')。MP3’);//修改音频路径jQuery('a.user_doplay ').查找(' img ').attr('src ',' http://沙盒。runjs。cn/uploads/RS/424/shsayjwv/play。png ');jQuery(这个)。查找(' img ').attr('src ',' http://沙盒。runjs。cn/uploads/RS/424/shsayjwv/stop。png ');jQuery('#play_list_ol ').查找(' a ').attr('name ',' stoped ');jQuery(这个)。attr('name ',' playing ');x . play();//播放} else if (x.play jQuery(this)).attr(' name ')==' playing '){ jQuery(this).查找(' img ').attr('src ',' http://沙盒。runjs。cn/uploads/RS/424/shsayjwv/play。png ');jQuery('#play_list_ol ').查找(' a ').attr('name ',' stoped ');x . pause();//暂停} else { alert('这个提示不应该出现');}});以上就是本文的全部内容,希望对大家的学习有所帮助。

版权声明:基于框架实现音乐播放试听列表是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。