queryCommandState method (Internet Explorer)

Switch View :
ScriptFree
queryCommandState method

Returns a Boolean value that indicates the current state of the command.

Syntax

object.queryCommandState(cmdID)

Standards information

There are no standards that apply here.

Parameters

cmdID [in]

Type: BSTR

String that specifies a command identifier.

Return value

Type: Boolean

Boolean that returns one of the following possible values:

Return valueDescription
true

The given command has been executed on the object.

false

The given command has not been executed on the object.

 

Remarks

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLDocument2 interface using IID_IHTMLDocument2 for the IID.

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLControlRange interface using IID_IHTMLControlRange for the IID.

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLTxtRange interface using IID_IHTMLTxtRange for the IID.

See also

document
controlRange
TextRange
ControlRangeCollection Constructor
HTMLDocument Constructor
TextRange Constructor
Reference
execCommand
queryCommandEnabled
queryCommandIndeterm
queryCommandSupported
queryCommandValue

 

 

Send comments about this topic to Microsoft

Build date: 2/14/2012