Javascript examples for DOM HTML Element:Parameter
You can create a <param> element by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">create an OBJECT and a PARAM element with an embedded audio file</button> <script> function myFunction() {/*from w w w . j ava2 s . co m*/ var x = document.createElement("OBJECT"); x.setAttribute("data", "your.wav"); 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>