Home  >  Article  >  Web Front-end  >  In-depth understanding of cument.execCommand() usage_Basic knowledge

In-depth understanding of cument.execCommand() usage_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:47:331666browse
Copy code The code is as follows:

D-Position allows absolutely positioned objects to be moved by dragging.
AbsolutePosition sets the position attribute of the element to "absolute" (absolute).
BackColor sets or gets the background color of the currently selected area.
BlockDirLTR is not currently supported.
BlockDirRTL is not currently supported.
Bold switches the bold display of the currently selected area.
BrowseMode is not currently supported.
Copy Copies the current selection to the clipboard.
CreateBookmark creates a bookmark anchor or gets the name of the bookmark anchor for the current selection or insertion point.
CreateLink Inserts a hyperlink on the current selection, or displays a dialog box allowing the user to specify the URL of a hyperlink to insert for the current selection.
Cut Copies the current selection to the clipboard and deletes it.
Delete delete the currently selected area.
DirLTR is not currently supported.
DirRTL is not currently supported.
EditMode is not currently supported.
FontName sets or gets the font of the currently selected area.
FontSize sets or gets the font size of the currently selected area.
ForeColor sets or gets the foreground (text) color of the currently selected area.
FormatBlock sets the current block formatting tag.
Indent increases the indent of the selected text.
InlineDirLTR is not currently supported.
InlineDirRTL is not currently supported.
InsertButton covers the current selection with a button control.
InsertFieldset covers the currently selected area with a box.
InsertHorizontalRule covers the current selection with a horizontal line.
InsertIFrame covers the current selection with an inline frame.
InsertImage covers the current selection with an image.
InsertInputButton covers the current selection with a button control.
InsertInputCheckbox covers the currently selected area with a checkbox control.
InsertInputFileUpload overwrites the current selection with the file upload control.
InsertInputHidden inserts a hidden control to cover the currently selected area.
InsertInputImage covers the current selection with an image control.
InsertInputPassword overwrites the current selection with password control.
InsertInputRadio covers the currently selected area with a radio button control.
InsertInputReset overwrites the current selection with the reset control.
InsertInputSubmit overwrites the current selection with a submit control.
InsertInputText covers the current selection with text control.
InsertMarquee covers the currently selected area with empty subtitles.
InsertOrderedList switches whether the currently selected area is a numbered list or a regular formatted block.
InsertParagraph overwrites the current selection with newlines.
InsertSelectDropdown covers the currently selected area with a drop-down box control.
InsertSelectListbox covers the currently selected area with a list box control.
InsertTextArea covers the currently selected area with a multi-line text input control.
InsertUnorderedList switches whether the currently selected area is a bullet list or a regular formatted block.
Italic switches the current selection area to italic display or not.
JustifyCenter Centers the currently selected area in the formatting block.
JustifyFull is not currently supported.
JustifyLeft will align the formatting block of the currently selected area to the left.
JustifyNone is not currently supported.
JustifyRight Right-aligns the formatting block where the currently selected area is located.
LiveResize forces the MSHTML editor to continuously update an element's appearance during scaling or movement, rather than only updating after the movement or scaling is complete.
MultipleSelection allows more than one site selectable element to be selected at a time when the user holds down the Shift or Ctrl key.
Open.
Outdent reduces the indent of the formatting block where the selected area is located.
OverWrite switches the insertion and overwriting of text state.
Paste overwrites the current selection with the clipboard contents.
PlayImage is not currently supported.
Print opens the print dialog box so the user can print the current page.
Redo.
Refresh refreshes the current document.
RemoveFormat Removes the formatting tag from the current selection.
RemoveParaFormat is not currently supported.
SaveAs saves the current web page as a file.
SelectAll selects the entire document.
SizeToControl is not currently supported.
SizeToControlHeight is not currently supported.
SizeToControlWidth is not currently supported.
Stop Stop.
StopImage is not currently supported.
StrikeThrough is not currently supported.
Subscript is not currently supported.
Superscript is not currently supported.
UnBookmark deletes all bookmarks from the current selection.
Underline switches the underline of the currently selected area to display or not.
Undo Undo.
Unlink deletes all hyperlinks from the current selection.
Unselect clears the selected status of the currently selected area.


JavaScript--execCommand Instruction Set










Ups and downs, gatherings and dispersions will change again, but we can always make a comeback.

If the sky is affectionate, the sky will also grow old, and the right path in the world will be vicissitudes of life.

Du Blame me for being too persistent, but I can’t wait for the flowers to bloom and the leaves to fall.



Please select above letters, then click following buttons:













< ;br>




NAME="Button11">


Normal The way is to activate an