我正在使用带有 knockout.viewmodel 插件的敲除。http://coderenaissance.github.io/knockout.viewmodel/
// JavaScript
// data variable is loaded from an ajax call
/*
var data = { simple: { friendlyText: "Hello World" } };
*/
viewmodel.scenario = ko.viewmodel.fromModel(data, options);
<!-- HTML Page -->
<!-- This does not bind -->
<input type="text" length="50" data-bind="textInput: scenario.simple.friendlyText" />
<!-- This does bind -->
<label data-bind="text: scenario.simple.friendlyText"></label>
input
我缺少或不做的元素上的 textInput 绑定有什么特别之处?