<button id="start" οnclick="test()">start</button>
<script>
var audio = document.createElement('audio');var source = document.createElement('source');
source.type = "audio/mpeg";
source.src = "img/1.mp3"; //mp3放置的路径
source.autoplay = "autoplay";
source.controls = "controls";
audio.appendChild(source);
function test(){
audio.play();
}
</script>