The Output object represents an HTML <output> element.
注: The <output> element is not supported in Internet Explorer / Edge.
You can access an <output> element by using getElementById():
チップ: You can also access an <output> element by searching through the elements collection of a form.
You can create an <output> element by using the document.createElement() method:
| Property | 説明 |
|---|---|
| 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