入门
监控属性
使用内置绑定
控制文本和外观
绑定逻辑控制
处理表单属性
click
绑定event
绑定submit
绑定enable
绑定disable
绑定value
绑定hasfocus
绑定checked
绑定options
绑定selectedOptions
绑定uniqueName
绑定
解析模板
高级应用
插件
更多信息
"disable" 绑定
目的
disable
绑定使DOM元素只有在参数值为 true
的时候才禁用。在form表单元素 input
, select
, 和 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
绑定正好相反,详情请参考 enable
binding绑定。
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