Javascript Reference - HTML DOM Menu Object








The Menu object represents an HTML <menu> element.

Example

We can access a <menu> element by using getElementById().

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

We can create a <menu> element by using the document.createElement() method.

var x = document.createElement('MENU');
Property Description
label Sets or gets the label attribute of the menu
type Sets or gets the type attribute of the menu




Standard Properties and Events

The Menu object supports the standard properties and events.