play.addEventListener("touchstart",function(){
if(myAudio.paused){
myAudio.play();
this.setAttribute("class","play music");
}else{
myAudio.pause();
this.setAttribute("class","music");
}
},false);
参考网站:
https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener
https://developer.mozilla.org/zh-CN/docs/Web/Events/touchstart