// 添加
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>
使用js页面添加或删除标签
原文地址:https://www.cnblogs.com/james641/p/10249780.html