Name
Output — an HTML form <output> element
Inherits from
Node, Element, FormControl
Synopsis
The Output object represents an HTML form <output> element. In browsers that
support them, Output objects implement most of the properties of
FormControl.
Properties
stringdefaultValueThis property is the initial value of the Output element’s
textContent(see Node). When the form is reset, itsvalueis restored to this value. If this property is set and the Output element is currently displaying its previousdefaultValue, the new default value will be displayed. Otherwise, the currently displayed value will not be changed.readonly DOMSettableTokenListhtmlForThe HTML
forattribute of an<output>element is a space-separated list of the IDs of elements whose values contributed to the computed content displayed by the<output>element.foris a reserved word in JavaScript, so this corresponding JavaScript property is namedhtmlForinstead. You can get and set this property as if it was an ordinary string value, or you can use the methods of DOMTokenList to query and set individual element IDs from the list.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access