Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能告诉我为什么单击复选框时,复选框没有被选中?
简单的代码在这里:http: //jsfiddle.net/VTvYG/5/
Observables 是函数,所以你应该改变
self.Selected = config;
到
self.Selected(config);
对于复选框,更改
<input type="checkbox" />
<input type="checkbox" data-bind="checked: AmISelected" />