Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Menu object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Menu object


Menu object

Menu objects represent HTML and menu elements.

Note: There is currently no mainstream browser support for elements.

Access the Menu object

You can use getElementById() to access the elements:

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

Create a Menu object

You can use the document.createElement() method to create the element:

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

Menu object properties

Property Describe
label Set or return the label property of the menu
type Set or return the type property value of the menu

Standard properties and events

Menu objects also support the standard properties and events


Related articles

HTML Reference Manual: HTML slt;menu.gt; Tags