我在一个页面中有很多mp3文件,我想在点击时播放mp3文件。如何使用jquery播放它们?
<a href="listen(1)" >play 1</a>
<a href="listen(2)" >play 2</a>
<a href="listen(3)" >play 3</a>
<a href="listen(4)" >play 4</a>
答案 0 :(得分:0)
$('a').click(function(){
// you have your mp3 file, play it
// the way that you'd like
var mp3 = $(this).prop('href');
});