JavaScript Indexing

settings_applicationsEventTarget  >   settings_applicationsNode  >   settings_applicationsDocument  >   settings_applications[[Prototype]]

{object_name}

Editing

ElementelementcreateElement(stringlocalName[, Objectoptions])

Details

지정된 태그 명으로 새로운 Element 객체를 생성한다.

구문

사용 예
document.createElement(tagName)
사용 예
document.createElement(tagName[, options])

매개 변수

stringlocalName필수

태그 명을 지정한다. 대소문자를 구분하지 않지만 지정된 태그 명은 모두 소문자로 처리한다.

Objectoptions선택

선택 지정 매개변수로 is 프로퍼티를 갖는 객체를 지정한다. is 프로퍼티에는 window.customElements.define() 메소드를 통해서 정의된 사용자 정의 요소의 태그 이름을 지정한다. 즉 사용자 정의 요소로 된 새로운 요소를 생성한다.

반환

Elementelement

새로운 Element 객체를 반환한다.

지원 웹브라우저