HTML DOM 문서 execCommand()
예시
선택한 텍스트를 굵게 표시:
document.execCommand("bold");
정의 및 사용
execCommand() 메서드는 더 이상 사용되지 않습니다. 사용하지 마십시오.
애플릿 속성은 모든 새 브라우저에서 빈 HTMLCollection을 반환합니다.
<applet> 요소는 HTML5에서 지원되지 않습니다.
통사론
document.execCommand(command, showUI, value)
매개변수
Parameter | Description |
command |
The name of the command to execute:
"backColor" "bold" "createLink" "copy" "cut" "defaultParagraphSeparator" "delete" "fontName" "fontSize" "foreColor" "formatBlock" "forwardDelete" "insertHorizontalRule" "insertHTML" "insertImage" "insertLineBreak" "insertOrderedList" "insertParagraph" "insertText" "insertUnorderedList" "justifyCenter" "justifyFull" "justifyLeft" "justifyRight" "outdent" "paste" "redo" "selectAll" "strikethrough" "styleWithCss" "subscript" "superscript" "undo" "unlink" "useCSS" |
showUI | A Boolean. Specifies if the UI should be shown or not. |
value | Some commands need a value to be completed. |
반환 값
유형 | 설명 |
부울 | true 명령이 지원되면 그렇지 않으면 false . |