Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Menu Object

HTML DOM Menu Object


Menu Object

The Menu object represents an HTML

.

Note:

element is currently not supported by mainstream browsers.

Accessing the Menu Object

You can use getElementById() to access an element.

element:

var x = document.getElementById("myMenu");

Creating the Menu Object

You can create an element using the document.createElement() method.

element:

var x = document.createElement("MENU");

Menu Object Properties

property Description
label Sets or returns the label attribute of the menu
type Sets or returns the value of the type attribute of the menu

Standard properties and events

The Menu object also supports the standard property and Events


Related Articles

HTML Reference Manual: HTML

tag