HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Output object represents an HTML <output> element
The Output object represents an HTML <output> element.
Access an Output Object
You can access an <output> element by using getElementById():
var x = document.getElementById("myOutput");
Create an Output Object
You can create an <output> element by using the document.createElement() method:
var x = document.createElement("OUTPUT");
Property | Description |
---|---|
defaultValue | Sets or returns the default value of an <output> element |
form | Returns a reference to the form that contains the <output> element |
htmlFor | Returns the value of the for attribute of an <output> element |
labels | Returns a list of <label> elements associated with the <output> element |
name | Sets or returns the value of the name attribute of an <output> element |
type | Returns which type of HTML element the Output object represents |
value | Sets or returns the value of an <output> element |
The Output object also supports the standard properties and events.
HTML reference: HTML <output> tag