Output name attribute
Definition and usage
name
Property setting or return <output> element of Name attribute Value.
The name attribute is used to identify form data after it is submitted to the server, or to reference form data on the client side using JavaScript.
See also:
HTML Reference Manual:HTML <output> name Attribute
HTML Reference Manual:HTML <output> Tag
Example
Example 1
Get the name of the <output> element:
var x = document.getElementById("myOutput").name;
Example 2
Change the name of the <output> element:
document.getElementById("myOutput").name = "newOutputName";
Syntax
Return the name property:
outputObject.name
Set the name property:
outputObject.name = name
Attribute Value
Value | Description |
---|---|
name | Specifies the name of the <output> element. |
Technical Details
Return Value: | A string value that represents the name of the <output> element. |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
10.0 | Not Supported | 4.0 | 5.1 | 11.0 |