下面这种写法音乐为什么不能暂停
window.onload = function(){
var play = document.getElementById("music");
var myAudio = document.getElementsByTagName("audio")[0];
play.onclick = function(){
if(myAudio.paused){
myAudio.paused = false;
}else{
myAudio.paused = true;
}
}
}