HTML DOM - uitvoervoorwerp
Uitsetvoorwerp
Die Uitset-objek verteenwoordig 'n HTML <afvoer>-element.
Let wel: Die <uitvoer>-element word nie in Internet Explorer / Edge ondersteun nie.
Toegang tot 'n uitvoervoorwerp
Jy kan toegang tot 'n <uitvoer>-element kry deur getElementById():
Voorbeeld
var x = document.getElementById("myOutput");
Wenk: Jy kan ook toegang tot 'n <afvoer> -element kry deur deur die elementversameling van 'n vorm te soek.
Skep 'n uitvoervoorwerp
Jy kan 'n <output> element skep deur die document.createElement() metode te gebruik:
Voorbeeld
var x = document.createElement("OUTPUT");
Uitsetvoorwerpeienskappe
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 eiendomme en geleenthede
Die Uitset-objek ondersteun ook die standaard eienskappe en gebeurtenisse .
Verwante bladsye
HTML verwysing: HTML <afvoer> tag