Text()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Please take two minutes to fill out our short survey.
Experimental: 이 기능은 실험적인 기능입니다.
프로덕션 환경에서 사용하기 전에 브라우저 호환성 표를 주의 깊게 확인하세요.
Text()
생성자는 옵션인 파라미터로 주어진 문자형 컨텐츠인 DOMString
으로 새롭게 생성된 Text
객체를 반환합니다.
문법
js
text1 = new Text(); // 빈 텍스트 노드 생성
text2 = new Text("텍스트 노드입니다");
예제
js
text = new Text("Test");
명세
Specification |
---|
DOM # ref-for-dom-text-text① |