0

我错过了什么?请帮忙。这是我的代码

var data= {
"CountyOfPractice":"Bronx",
"Territory":"TERR0102",
 "Specialty":"OralSurgery",
 "Fulltime":true,
"Occurence":false,
"Discounts":"waiver_of_consent,one_time_payment",
"Payment":null,
"Rate":{"Claims made year 1":7668,
"Claims made year 2":14667,
"Claims made year 3":19171,
"Claims made year 4":21181,
"Claims made year 5":22982,
"Mature Claims Made: ":24253}
};

//Create model
var viewModel = ko.mapping.fromJS(data);
//bind
ko.applyBindings(viewModel);

这是HTML

<input type="text" data-bind="value: CountyOfPractice" />

并且没有任何反应,输入框是空的。请指教

4

1 回答 1

0

知道了。使用坏链接到 knockout.mapping 这是好的链接 http://cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.3.5/knockout.mapping.js

现在它也对我有用!!!

于 2013-07-07T04:52:33.043 回答