<html>
<body>
<object data="/i/audio/song.mp3">
<param id="myParam" name="autoplay" value="true">
</object>
<p>点击按钮可返回参数的 name 属性的值。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myParam").name;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>