html5 audio JavaScript 点击播放暂停
var audio = document.getElementById("media");
var btn = document.getElementById("audio");
btn.onclick = function () {
if (audio.paused) { //判断当前的状态是否为暂停,若是则点击播放,否则暂停
audio.play();
}else{
audio.pause();
}
}