TAGS

Editing
  • account_tree
  • bug_report

<dialog>

사용자에게 특정 작업을 수행(열람, 확인 등)하게 하거나 사용자로부터 정보를 수집하기 위한 목적으로 상호작용하는 작은 창 형태로 제공되는 위젯을 나타낸다.

  • 콘텐츠 분류

  • 허용된 부모 요소 또는 위치

    FLOW CONTENT

    플로우 콘텐츠(flow-content)가 예상되는 위치

  • 콘텐츠 모델

  • 태그 생략

    시작 태그, 종료 태그 모두 작성

  • DOM Interface

    HTMLDialogElement

    [Exposed=Window]
    interface HTMLDialogElement : HTMLElement {
      [HTMLConstructor] constructor();
    
      [CEReactions] attribute boolean open;
      attribute DOMString returnValue;
      [CEReactions] undefined show();
      [CEReactions] undefined showModal();
      [CEReactions] undefined close(optional DOMString returnValue);
    };

설명

<dialog> 요소는 사용자와 상호작용하기 위해서는 자바스크립트의 개입이 필요하다. HTMLDialogElement 인터페이스를 참고한다.

구문

마크업 형식
<dialog></dialog>
Example

애트리뷰트

open boolean attributes

대화 상자를 표시한다.

About Boolean attributes

불리언(boolean) 값을 나타낸다. 예를 들어 다음 세 가지 값은 모두 참(true)이다.

<input disabled>, <input disabled="disabled">, <input disabled="">

사용 예

글로벌 애트리뷰트

일부 글로벌 애트리뷰트는 이 요소에서 사용되지 않을 수 있다.

글로벌 이벤트 핸들러

일부 글로벌 이벤트 핸들러는 이 요소에서 사용되지 않을 수 있다. 이벤트 등록은 자바스크립트 사용을 권장한다.

버전 명세

HTML Standard
#the-dialog-element

지원 웹브라우저