HTML DOM Output name Property Last Updated : 15 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The Output name Property in HTML DOM is used to set or return the value of the name Attribute of an <output> element. The name Attribute is used to reference the form-data after submitting the form or to reference the element in JavaScript. Syntax: It returns the name property.outputObject.name It set the name property.outputObject.name = name Property value: It contains the value name Which specifies the name of the Output Element. Return value: It returns a string value that specifies the name of the Output Element. Example 1: This Example returns an Output name Property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Output name Property </title> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h4> HTML DOM Output name Property </h4> <form oninput="sumresult.value = parseInt(A.value) + parseInt(B.value) + parseInt(C.value)"> <input type="number" name="A" value="50" /> + <input type="range" name="B" value="0" /> + <input type="number" name="C" value="50" /> <br /> Submit Result: <output name="sumresult" id="geeks" for="A B C"> </output> <br> <br> </form> <Button onclick="myGeeks()">Submit</Button> <h2 id="sudo"></h2> <script> function myGeeks() { let x = document.getElementById("geeks").name; document.getElementById("sudo").innerHTML = x; } </script> </body> </html> Output: Example 2: This Example sets the Output name Property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Output name Property </title> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h4> HTML DOM Output name Property </h4> <form oninput="sumresult.value = parseInt(A.value) + parseInt(B.value) + parseInt(C.value)"> <input type="number" name="A" value="50" /> + <input type="range" name="B" value="0" /> + <input type="number" name="C" value="50" /> <br /> Submit Result: <output name="sumresult" id="geeks" for="A B C"> </output> <br> <br> </form> <Button onclick="myGeeks()">Submit</Button> <h2 id="sudo"></h2> <script> function myGeeks() { let x = document.getElementById("geeks").name = "Total result"; document.getElementById("sudo").innerHTML = "The name was changed to " + x; } </script> </body> </html> Output: Supported Browsers: The browsers supported by HTML DOM Output name Property are listed below: Google Chrome 10.0Firefox 4.0Opera 11.0Safari 5.1 Comment More infoAdvertise with us Next Article HTML DOM Output name Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Similar Reads HTML DOM name Property The DOM name Property is used to return the name of the attribute. It is used for read-only. Syntax: attribute.name Return Value: This property returns a string value that represents the name of the attribute. Example: In this example, we are using DOM name Property for the attribute. HTML <!DOCT 1 min read HTML | DOM Object name Property The HTML | DOM Object name Property is used to set or return the value of a name attribute of an <object> element. The name attribute is used to specify the name of the embedded file. Syntax: It returns the name property objObject.nameIt is used to set the name property. objObject.name = name 2 min read HTML | DOM Output htmlFor Property The HTML DOM Output htmlFor Property is used for returning the value of the for attribute of an <Output> Element. The htmlFor Attribute is used to specify the relationship between the result and the calculation. Syntax: outputObject.htmlFor Parameter: This property does not accepts any paramet 1 min read HTML DOM Output type Property The HTML DOM Output type Property is used for returning the type of Output Element, the type of element the Output object represents. This property will always return the "output". Syntax: outputObject.type Parameter: This property does not accept any parameter. Return value: It returns a string val 1 min read HTML | DOM Output form Property The Output form Property in HTML DOM is used for returning a reference to the form where an <Output> Element belongs to. It is read-only Property that returns a form object on success. Syntax: outputObject.form Note: There is no property values in HTML DOM Output form Property. Return value: A 1 min read Like