HTML DOM- uitvoerobject
Uitvoerobject
Het Output-object vertegenwoordigt een HTML <output>-element.
Opmerking: het element <output> wordt niet ondersteund in Internet Explorer / Edge.
Toegang tot een uitvoerobject
U kunt toegang krijgen tot een <output>-element met getElementById():
Voorbeeld
var x = document.getElementById("myOutput");
Tip: U kunt ook toegang krijgen tot een <output>-element door te zoeken in de elementenverzameling van een formulier.
Een uitvoerobject maken
U kunt een <output>-element maken door de methode document.createElement() te gebruiken:
Voorbeeld
var x = document.createElement("OUTPUT");
Eigenschappen uitvoerobject
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 |
Standaard eigenschappen en evenementen
Het Output - object ondersteunt ook de standaard eigenschappen en events .
Gerelateerde pagina's
HTML-referentie: HTML <output>-tag