返回顶部

收藏

播放网页音频

更多
<script>
    function play(url){

        var audio = document.createElement('audio');
        var source = document.createElement('source');
        source.type = "audio/mpeg";
        source.type = "audio/mpeg";
        source.src = url;
        source.autoplay = "autoplay";
        source.controls = "controls";
        audio.appendChild(source);
        audio.play();
        $('.btn').hide();
        $('.stop').show();
    }
</script>

标签:html

收藏

0人收藏

支持

0

反对

0

发表评论