JS - 音频的播放和暂停
$(".gameSound").bind("click",function() {
var audio = document.getElementById('music1');
if(audio.paused){
$(".gameSound").css({ //切换到播放的背景图片
"background": "url(../../../img/game/Sound.png) center no-repeat",
"background-size": "cover"
})
audio.play();//audio.play();//播放
}else{
$(".gameSound").css({ //切换到暂停的背景图片
"background": "url(../../../img/game/SoundClose.png) center no-repeat",
"background-size": "cover"
})
audio.pause();// 暂停
}
})