<audio id='a01'><source src="music.mp3" type="audio/mpeg"></audio>
JS
$(".stars").click(function() {
$('#a01')[0].play();
});
这有效,但我怎么能这样说:
$(".stars").click(function() {
var selector=$('#a01')[0];
selector.currentTime = 10;
selector.finalTime = 20;
selector.attr.add('loop');
selector.play(); // play with loop from 10 to 20 sec.
});