<p>点击按钮来创建包含内嵌音频文件的 OBJECT 和 PARAM 元素。</p>
<button onclick="myFunction()">试一下</button>
var x = document.createElement("OBJECT");
x.setAttribute("data", "/img/horse.mp3");
x.setAttribute("id", "myObject");
document.body.appendChild(x);
var y = document.createElement("PARAM");
y.setAttribute("name", "autoplay");
y.setAttribute("value", "true");
document.getElementById("myObject").appendChild(y);