HTML DOM - kieslysvoorwerp
Kieslysvoorwerp
Die Menu-objek verteenwoordig 'n HTML <menu>-element.
Let wel: Die <menu>-element word tans NIE in enige van die belangrikste blaaiers ondersteun nie.
Toegang tot 'n spyskaartvoorwerp
Jy kan toegang tot 'n <menu>-element kry deur getElementById():
var x = document.getElementById("myMenu");
Skep 'n spyskaartvoorwerp
Jy kan 'n <menu>-element skep deur die document.createElement() metode te gebruik:
var x = document.createElement("MENU");
Menu-objek-eienskappe
Property | Description |
---|---|
label | Sets or returns the value of the label attribute of the menu |
type | Sets or returns the value of the type attribute of the menu |
Standaard eiendomme en geleenthede
Die Menu-objek ondersteun ook die standaard eienskappe en gebeurtenisse .
Verwante bladsye
HTML verwysing: HTML <menu> tag