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 。 |