我正在尝试播放一系列mp3声音.我的html中有一个音频文件,并document.CreateElement()在我的JavaScript中使用它.
当我尝试设置src属性(setAttribute("src", string))时,我在IE中收到错误,说"未实现".
我尝试使用新的Audio(),我在IE中得到了同样的错误,"Not Implemented".这两种方法都适用于Google Chrome和Firefox.
有人可以帮忙吗?
<audio id="audio1" >Not supported</audio>
Run Code Online (Sandbox Code Playgroud)
audioElm = document.getElementById("audio1");
audioElm.setAttribute("src", aud[count]);
audioElm.play();
Run Code Online (Sandbox Code Playgroud)