入门

监控属性

使用内置绑定

控制文本和外观

绑定逻辑控制

处理表单属性

解析模板

高级应用

插件

更多信息

"disable" 绑定

目的

disable 绑定使DOM元素只有在参数值为 true 的时候才禁用。在form表单元素 inputselect, 和 textarea上非常有用。

The disable binding causes the associated DOM element to be disabled only when the parameter value is true. This is useful with form elements like input, select, and textarea.

disable绑定和 enable 绑定正好相反,详情请参考 enablebinding绑定。

This is the mirror image of the enable binding. For more information, see documentation for the enable binding, because disable works in exactly the same way except that it negates whatever parameter you pass to it.

(c) knockoutjs.com