共用方式為


Command.disabled property

Gets or sets a value that indicates whether the Command is disabled.

Syntax

<div 
  data-win-control="WinJS.UI.Command" 
  data-win-options="{ disabled : value}">
</div>
var disabled = command.disabled;
command.disabled = disabled;

Property value

Type: Boolean

true if the Command is disabled; otherwise, false.

Requirements

Minimum WinJS version

WinJS 4.0

Namespace

WinJS.UI

See also

Command