★ wanayoo — archive 1999 http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/queryCommandEnabled.aspNouvelle recherche | Portail wanayoo
MSDN Online Web Workshop   All Products  |   Support  |   Search  |   microsoft.com Home  
microsoft.com Home
  HOME  |   VOICES  |   LIBRARIES  |   COMMUNITY  |   DOWNLOADS  |   SITE GUIDE  |   SEARCH MSDN
 
Click to return to the DHTML, HTML & CSS home page  
prompt Method     queryCommandIndeterm Meth...     DHTML Methods    
Web Workshop  |  DHTML, HTML & CSS

queryCommandEnabled Method


Returns whether the command can be successfully executed using execCommand, given the current state of the document.

Syntax

bEnabled = object.queryCommandEnabled(sCmdID)

Parameters

sCmdIDRequired. String that specifies a command identifier.

Return Value

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

Remarks

Using queryCommandEnabled("delete") on a TextRange object returns true, while queryCommandEanbled("delete") on a document object returns false. However, execCommand("delete") can still be used to delete the selected text.

Applies To

document, controlRange, TextRange

See Also

execCommand, 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.