编辑您的代码:
查看结果:
<!DOCTYPE html> <html> <body> <h3>演示如何创建 PARAM 元素</h3> <p>点击按钮来创建包含内嵌音频文件的 OBJECT 和 PARAM 元素。</p> <button onclick="myFunction()">试一下</button> <script> function myFunction() { var x = document.createElement("OBJECT"); x.setAttribute("data", "../i/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); } </script> </body> </html>
查看结果:
系统帮助
|
给我留言
|
收藏本站
Copyright © 2005-2008
www.cnn84.com
All Rights Reserved Ver:2.0
桂公网安备45122402000102号
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南
下午好!上班不忘查信息,精神可嘉!CNN84祝你工作顺利!