Comment: In the audio tag in html 5, there is only a pause button, but no stop button. In fact, it is not troublesome to add it. Next, the implementation method is introduced. Friends who need it can refer to it.
In the audio tag in html 5, there is only a pause button but no stop button. In fact, it is not troublesome to add it. The method is as follows:HTMLAudioElement.prototype.stop = function()
{
this.pause();
this.currentTime = 0.0;
}
In fact, it is very simple, just pause first and then the time is 0;
Calling method:
var aud = new Audio();
aud.src = 'Special He.ogg';
aud.play();
aud.stop();
The above code can be run under chrome and opera, but firefox 17 cannot