HTML DOM MenuItem 개체
MenuItem 개체
MenuItem 개체는 HTML <menuitem> 요소를 나타냅니다.
참고: <menuitem> 요소는 현재 Firefox에서만 지원됩니다.
MenuItem 개체에 액세스
getElementById()를 사용하여 <menuitem> 요소에 액세스할 수 있습니다.
var x = document.getElementById("myMenuItem");
MenuItem 개체 만들기
document.createElement() 메서드를 사용하여 <menuitem> 요소를 만들 수 있습니다.
var x = document.createElement("MENUITEM");
MenuItem 개체 속성
Property | Description |
---|---|
checked | Sets or returns whether the menu item should be checked |
command | Sets or returns the value of the command attribute of the menu item |
default | Sets or returns whether the menu item should be the default command |
disabled | Sets or returns whether the menu item should be disabled |
icon | Sets or returns an image that represents the menu item |
label | Sets or returns the value of the label attribute of the menu item |
radiogroup | Sets or returns the value of the radiogroup attribute of the menu item |
type | Sets or returns the value of the type attribute of the menu item |
표준 속성 및 이벤트
MenuItem 개체는 표준 속성 과 이벤트 도 지원합니다 .
관련 페이지
HTML 참조: HTML <menuitem> 태그