audio.play dom對象 JQ不支持play

  */
        PausePlayVoice:function() {
            $("#spPauseAudio").click(function() {
                var audio =document.getElementById("audio");;
                if ($(this).text() == "關閉聲音") {
                    audio.pause();
                    $(this).text("開啓聲音");
                } else {
                   audio.play();
                    $(this).text("關閉聲音");
                }
            });
        },this

相關文章
相關標籤/搜索