Dokument HTML DOM execCommand()
Příklad
Označte vybraný text tučně:
document.execCommand("bold");
Definice a použití
Metoda execCommand() je zastaralá. NEPOUŽÍVEJTE jej.
Vlastnost applety vrací prázdnou HTMLCollection ve všech nových prohlížečích.
Element <applet> není v HTML5 podporován.
Syntax
document.execCommand(command, showUI, value)
Parametry
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. |
Návratová hodnota
Typ | Popis |
Boolean | true pokud je příkaz podporován, jinak false . |