自动播放音频
<!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="jquery-1.11.3.min.js"></script> </head> <body> <!-- <audio onended="myFunction()"> --> <audio onended="myFunction()" class="next" controls autoplay src="http://www.jlgreen.cn/BookQRScanner/ASBook170930/audio/001.mp3 "></audio> </body> </html> <script type="text/javascript"> function myFunction(){ var audios=["http://www.jlgreen.cn/BookQRScanner/ASBook170930/audio/002.mp3 ","http://www.jlgreen.cn/BookQRScanner/ASBook170930/audio/003.mp3 "]; var i=0; if(audios[i]) { $(".next").attr('src',audios[i]); i++; }else{ alert('·ÅÍêÁË'); } } </script>