首页 > 技术文章 > audio.play dom对象 JQ不支持play

kunlunmountain 2017-01-03 14:48 原文

  */
        PausePlayVoice:function() {
            $("#spPauseAudio").click(function() {
                var audio =document.getElementById("audio");;
                if ($(this).text() == "关闭声音") {
                    audio.pause();
                    $(this).text("开启声音");
                } else {
                   audio.play();
                    $(this).text("关闭声音");
                }
            });
        },

推荐阅读