Javascript DOM HTML Menu Object get

Introduction

The Menu object represents an HTML <menu> element.

The <menu> element is currently NOT supported in any of the major browsers.

We can access a <menu> element via document.getElementById():

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

Create a Menu Object

We can create a <menu> element via the document.createElement() method:

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

Menu Object Properties

Property Description
labelSets or returns the value of the label attribute of the menu
type Sets or returns the value of the type attribute of the menu



PreviousNext

Related