// 添加
var container = document.getElementById('divAudio');
container.appendChild(audio);

// 删除
var
container = document.getElementById('divAudio'); if (container.firstChild !== null) { console.log('删除audio元素');
document.getElementById('divAudio').removeChild(container.firstChild); }
<div id="divAudio"></div>

 

相关文章:

  • 2022-12-23
  • 2021-11-23
  • 2021-10-21
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2021-12-15
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-11-23
相关资源
相似解决方案