queryCommandText method (document, TextRange, ...)
Returns the description of the specified command.
The description of some commands depend on the current state of their target. To get the state of a command, use the queryCommandState method. See the example for details.
Note: the queryCommandSupported method is supported by Firefox, but it is not implemented and raises an exception.
You can find the related objects in the Supported by objects section below.
|Required. A case-insensitive string that specifies the name of the command. See command identifiers for more information.|
String. Information about the specified command.
Example HTML code 1:
This example illustrates the use of the queryCommandText method:
Did you find this example helpful?
User Contributed Comments