HTML | DOM Input Hidden value Property Last Updated : 24 Aug, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The Input Hidden value property in HTML DOM is used to set or return the value of the value attribute of the hidden input field. The value attribute defines the default value of the input hidden field. Syntax: It returns the value property.hiddenObject.valueIt is used to set the value property.hiddenObject.value = text Property Values: This property contains single value text which is used to specify the initial value of the input hidden field. Return Value: It returns a string value which represent the value of the value attribute of the hidden input field. Example 1: This example illustrates how to return the hidden value property. html <!DOCTYPE html> <html> <head> <title> HTML DOM Input Hidden value Property </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM Input Hidden value Property</h2> <input type="hidden" id="GFG" value="GeeksForGeeks"> <button onclick="myGeeks()"> Submit </button> <p id="sudo" style="color:green;font-size:35px;"></p> <!-- Script to return the hidden value --> <script> function myGeeks() { var x = document.getElementById("GFG").value; document.getElementById("sudo").innerHTML = x; } </script> </body> </html> Output: Before clicking on the button : After clicking on the button: Example 2: This example illustrate how to set the hidden property. html <!DOCTYPE html> <html> <head> <title> HTML DOM Input Hidden value Property </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM Input Hidden value Property</h2> <input type="hidden" id="GFG" value="GeeksForGeeks"> <button onclick="myGeeks()"> Submit </button> <p id="sudo" style="color:green;font-size:20px;"></p> <!-- Script to set hidden property value --> <script> function myGeeks() { var x = document.getElementById("GFG").value = "Sudo Placement"; document.getElementById("sudo").innerHTML = "The value of the value attribute" + " have changed to " + x; } </script> </body> </html> Output: Before clicking on the button: After clicking on the button: Supported Browsers: The browser supported by DOM input Hidden value Property are listed below: Google Chrome 1Edge 12Firefox 1Opera 2Safari 1 Comment More infoAdvertise with us Next Article HTML | DOM Input Number value Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML | DOM Input Hidden type Property The DOM input Hidden type Property is used for returning the type of form element the hidden input field is. The Input Hidden type returns a string value which represents the type of form element the hidden input field is.Syntax: hiddenObject.type Return Values: It returns a string value which defin 1 min read HTML | DOM Input Hidden form Property The Input Hidden form property is used to return the reference of the form containing the Input Hidden field. It is read-only Property that returns a form object on success. Syntax: hiddenObject.form Return Values: It returns a string value which specify the reference of the form containing the Inpu 1 min read HTML | DOM Input Hidden name Property The Input Hidden name property in HTML DOM is used to set or return the value of the name attribute. The form data which has been submitted to the server can be identified by the name attribute. The name attribute is also used for referencing form data on the client side using JavaScript. Syntax: It 2 min read HTML | DOM Input Number value Property The DOM Input Number value Property in HTML DOM is used to set or return the value of a value attribute of the number field. The value attribute specifies the initial value of the input number Field. It contains the default value or the user types. Syntax: It returns the value property.numberObject. 2 min read HTML | DOM Input Search value Property The DOM Input Search value Property in HTML DOM is used to set or return the value of a value attribute of the search field. The value attribute specifies the initial value of the input search Field. It contains the default value or user types. Syntax: It returns the value property.searchObject.valu 2 min read HTML | DOM Input Hidden Object The Input Hidden object in HTML DOM represents the <input> element with type = âhiddenâ attribute. The element can be accessed by using getElementById() method.Syntax: document.getElementById("id"); where id is assigned to the <input> tag.Property Values: defaultvalue: It is used to set 2 min read Like