The Map Object property in HTML DOM is used to create and access the <param> element with in the object.Parameters for plugin embedded with an element is done by using the element.
Syntax:
- It is used to access a <param> element.
var x = document.getElementById("myParam"); - It is used to create a <param> element.
var x = document.createElement("PARAM");
Property Values:
- name: It is used to set or return the value of the name attribute of a parameter.
- value: It is used to set or return the value of the value attribute of a parameter.
Example-1: Access param element’s name value.
<!DOCTYPE html> <html> <title> HTML DOM Parameter Object Property </title> <body> <h4>Click the button</h4> <button onclick="GFG()">Click Here!<br> </button> <p></p> <object data="sample.mp4"> <param id="myParam" name="Autoplay" value="true"> </object> <p id="Geeks"></p> <script> function GFG() { var x = document.getElementById("myParam").name; document.getElementById("Geeks").innerHTML = x; } </script> </body> </html> |
chevron_right
filter_none
Output:
- Before click on the button
- After click on the button

Example-2: Create param element using document.createElement(“OBJECT”);.
<!DOCTYPE html> <html> <title> HTML DOM Menu Object Property </title> <body> <h4>Click the button</h4> <button onclick="GFG()">Click Here!<br> </button> <p></p> <script> function GFG() { var x = document.createElement("OBJECT"); x.setAttribute("data", "sample.mp4"); 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> |
chevron_right
filter_none
Output:
- Before click on the button
- After click on the button

Steps to execute the above code:
- Add media file.
- Save the file locally.
- Run on the standard browser.
Supported Browsers: The browser supported by DOM Parameter Object property are listed below:
- Google Chrome 5.0
- Internet Explorer 8.0
- Firefox 3.6
- Safari 5.0
- Opera 10.6
Recommended Posts:
- How to define a parameter for an object using HTML ?
- HTML | DOM Parameter value Property
- HTML | DOM Parameter name Property
- HTML | DOM Object Object
- Passing a function as a parameter in JavaScript
- Argument vs Parameter in Java
- How to add a parameter to the URL in JavaScript ?
- JavaScript | Pass string parameter in onClick function
- How to get the javascript function parameter names/values dynamically?
- How to set a default parameter value for a JavaScript function ?
- How to pass an array as a function parameter in JavaScript ?
- How to create default function parameter in PHP?
- Fabric.js | Ellipse opacity Parameter
- JavaScript SyntaxError - Malformed formal parameter
- How to Pass Image as a parameter in JavaScript function ?
- How to check a JavaScript Object is a DOM Object ?
- HTML | DOM HTML Object
- HTML | DOM Input Week Object
- HTML | DOM Column Object
- HTML | DOM Del Object
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


