Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML | DOM Parameter value Property

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The HTML DOM Parameter value Property is used to set or return the value of the value attribute of a parameter, however, the contents of the value attribute do not shown to the user. When the form is submitted by the user, the value and the other information sent to the server. But when the checkbox is an unchecked state, therefore, no information will be sent.
Syntax: 
 

  • It return the value property: 
     
parameterObject.value 
  • It is used to set the value property. 
     
parameterObject.value = value 

Property Values It contains single value text which is used to specify the value associated with the parameter.
Return Value: It returns a string value that represents the value of the value attribute of a parameter.
Example 1: This example returns the parameter value  property. 
 

html




<!DOCTYPE html>
<html>
    <title>
        HTML DOM Parameter value Property
    </title>
<body>
     <center>
<h2>
    GeeksForGeeks
</h2>
<h2>
    HTML DOM Parameter value Property
</h2>
    <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").value;
        document.getElementById("Geeks").innerHTML = x;
        }
    </script>
    </center>
</body>
</html>

Output: 
Before clicking on the Button: 
 

After clicking on the Button: 
 

Supported Browsers: The browsers supported by DOM Parameter value Property are listed below: 
 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

 


My Personal Notes arrow_drop_up
Last Updated : 05 Dec, 2022
Like Article
Save Article
Similar Reads
Related Tutorials