<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.
});