Command Identifiers

Command Identifiers


Command identifiers specify an action to take on the given object. Use them with the following methods:

BackColor Command Bold Command Copy Command
CreateBookmark Command CreateLink Command Cut Command
Delete Command FontName Command FontSize Command
ForeColor Command FormatBlock Command Indent Command
InsertButton Command InsertFieldset Command InsertHorizontalRule Command
InsertIFrame Command InsertInputButton Command InsertInputCheckbox Command
InsertInputFileUpload Command InsertInputHidden Command InsertInputPassword Command
InsertInputRadio Command InsertInputReset Command InsertInputSubmit Command
InsertInputText Command InsertMarquee Command InsertOrderedList Command
InsertParagraph Command InsertSelectDropdown Command InsertSelectListbox Command
InsertTextArea Command InsertUnorderedList Command Italic Command
JustifyCenter Command JustifyLeft Command JustifyRight Command
Outdent Command OverWrite Command Paste Command
PlayImage Command Refresh Command RemoveFormat Command
SelectAll Command StopImage Command UnBookmark Command
Underline Command Unlink Command Unselect Command

Command Identifiers Reference

BackColor Command

Sets the background color of the current selection.

value
A string specifying a color. Can be any one of the color names or values given in Color Table.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Bold Command

Wraps a <B> tag around the object.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Copy Command

Copies the object to the clipboard.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

CreateBookmark Command

Wraps an <A Name=> tag around the object, or edits an existing tag.

value
A string specifying any valid bookmark name. If value is blank, the bookmark is removed.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

CreateLink Command

Wraps an <A HREF...> tag around the current selection.

value
A string specifying any valid URL.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Cut Command

Copies the object to the clipboard and then deletes it.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Delete Command

Deletes the object.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

FontName Command

Sets the typeface for the current selection.

value
A string specifying a font name, as described by the face property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

FontSize Command

Sets the font size of the current selection.

value
A string specifying a font size, as described by the size property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

ForeColor Command

Sets the foreground (text) color of the current selection.

value
A string specifying a color. Can be any one of the color names or values given in Color Table.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

FormatBlock Command

Wraps a block tag as specified around the current object.

value
A string specifying the action to carry out.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Indent Command

Indents the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertButton Command

Inserts a <BUTTON> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertFieldset Command

Inserts a <FIELDSET> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertHorizontalRule Command

Inserts <HR> at the current insertion point.

value
A string specifying the size of the rule.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertIFrame Command

Inserts an <IFRAME> tag at the current insertion point.

value
A string specifying a valid URL, as described by the src property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputButton Command

Inserts an <INPUT Type = Button...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputCheckbox Command

Inserts an <INPUT Type = Checkbox...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputFileUpload Command

Inserts an <INPUT Type = FileUpload...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputHidden Command

Inserts an <INPUT Type = Hidden...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputImage Command

Inserts an <INPUT Type = Image...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue

InsertInputPassword Command

Inserts an <INPUT Type = Password...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputRadio Command

Inserts an <INPUT Type = Radio...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputReset Command

Inserts an <INPUT Type = Reset...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputSubmit Command

Inserts an <INPUT Type = Submit...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertInputText Command

Inserts an <INPUT Type = Text...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertMarquee Command

Inserts a <MARQUEE> at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertOrderedList Command

Inserts an <OL> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

The command creates an initial LI element if necessary.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertParagraph Command

Inserts a <P> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertSelectDropdown Command

Inserts an <SELECT Type = Dropdown...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertSelectListbox Command

Inserts an <SELECT Type = Listbox...> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertTextArea Command

Inserts a <TEXTAREA> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

InsertUnorderedList Command

Inserts a <UL> tag at the current insertion point.

value
A string specifying an SGML identifier, as described by the id property.

The command creates an initial LI element if necessary.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Italic Command

Wraps an <I> tag around the object.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

JustifyCenter Command

Centers the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

JustifyFull Command

Full justifies the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

JustifyLeft Command

Left justifies the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

JustifyRight Command

Right justifies the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Outdent Command

Outdents the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

OverWrite Command

Sets the input-typing mode to overwrite or insert.

value
A Boolean value or a string representing a Boolean value. If true, input-typing mode is overwrite.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Paste Command

Pastes the contents of the clipboard at the current insertion point or over the current selection.

This command does not use the value parameter.

To prevent a breach of security, this command can only paste data that has been placed on the clipboard by script.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

PlayImage Command

Starts playing any dynamic images within the object. A dynamic image is any image specified using the dynsrc property of the IMG element.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Refresh Command

Reloads the source of the current document.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

RemoveFormat Command

Removes formatting from the current selection.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

SelectAll Command

Selects the entire text of the document.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

StopImage Command

Stops playing any dynamic images within the object.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

See also PlayImage

UnBookmark Command

Removes tags from the given selection or text range.

If you have the following selection:

<a name=foo>testing</a>

document.execCommand("selectall");
document.execCommand("Unbookmark")

The command removes the A tag, leaving the string "testing".

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Underline Command

Wraps a <U> tag around the object.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Unlink Command

Removes a link.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

Unselect Command

Clears a selection from the document.

This command does not use the value parameter.

Applies To

execCommand queryCommandEnabled queryCommandIndeterm queryCommandState queryCommandSupported queryCommandValue

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.