HTML DOM Document execCommand()
描述
execCommand() 方法已棄用。請勿使用它。
applets 屬性在所有新瀏覽器中都返回一個空的 HTMLCollection。
HTML5 不支援 <applet> 元素。
語法
document.execCommand(command, showUI, value)
引數
引數 | 描述 |
command | 要執行的命令的名稱 "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 | 布林值。 指定是否顯示 UI。 |
value | 某些命令需要一個值才能完成。 |
返回值
型別 | 描述 |
布林值 | 如果支援該命令,則為 true ,否則為 false 。 |