HTMLDOMメニューオブジェクト
メニューオブジェクト
Menuオブジェクトは、HTMLの<menu>要素を表します。
注: <menu>要素は、現在、主要なブラウザーではサポートされていません。
メニューオブジェクトにアクセスする
getElementById()を使用して、<menu>要素にアクセスできます。
var x = document.getElementById("myMenu");
メニューオブジェクトを作成する
document.createElement()メソッドを使用して、<menu>要素を作成できます。
var x = document.createElement("MENU");
メニューオブジェクトのプロパティ
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 |
標準のプロパティとイベント
Menuオブジェクトは、標準のプロパティとイベントもサポートします。
関連ページ
HTMLリファレンス:HTML <menu>タグ