我正在使用HTML5音频标签。我已将源设置为某些文件。现在我想清除它。
var audio = new Audio();
audio.src = "there was some file here";
//now i manually set this to empty string
audio.src = ""
Run Code Online (Sandbox Code Playgroud)
当我对此进行调试时,实际上会将源设置为该文件所在的HTML文件,而不是空字符串。为什么会这样,从标签中删除源代码的正确方法是什么。