Click to return to the DHTML, HTML     
empty Method     execScript Method     DHTML Methods    
Web Workshop  |  DHTML, HTML & CSS

execCommand Method


Executes a command over the given selection or text range.

Syntax

bSuccess = object.execCommand(sCommand [, bUserInterface] [, vValue])

Parameters

sCommandRequired. String that specifies the command to execute, which can be any valid command identifier.
bUserInterfaceOptional. Boolean that specifies one of the following values:
falseDefault. Does not display a user interface.
trueDisplays a user interface, if the command supports one.
vValueOptional. Variant that specifies the string, number, or other value to assign. Possible values depend on sCommand.

Return Value

Boolean. Returns true if the command is successful, or false otherwise.

Remarks

Do not invoke the execCommand method until after the page loads.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
document, controlRange, TextRange

See Also

queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.