Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Datalist extends Element

Datalist를 편집하는데 사용되는 API 모델입니다The API model used to edit the Datalist.

Methods

Table of Contents
maxLevel3
minLevel3

remove()

Removes the Element 자신을 제거합니다itself.

Status
subtletrue
colourRed
title모든 Element를 제거할 경우 이후의 작업에서 오류가 발생할 수 있습니다.

Code Block
languagejs
themeEmacs
var datalist = editor.getAPIModelById('id');
datalist.remove();

replace(html)

  • html <String> 교체할 <String> The HTML String to replace.

Element 자신을 인자로 넘겨받은 HTML String으로 교체합니다Replaces the element itself with the HTML String passed as an argument.

Code Block
languagejs
themeEmacs
var datalist = editor.getAPIModelById('animals');
datalist.replace("<datalist id='animals'><option value='강아지Dog'><option value='고양이Cat'><option value='병아리Chick'></datalist>");