我有一个KnockOut视图模型
viewModel = {
// Observables
insuredPersonList: ko.observableArray(),
premiumFrequency: ko.observable(initialData.premiumFrequency),
monthlyType: ko.observable(getMonthlyTypeFromInitialData()),
includeCareClause: ko.observable(initialData.includeCareClause),
nrOfInsuredChildren: ko.observable(initialData.nrOfInsuredChildren),
hasValidResponse: ko.observable(false),
currentCalculations: ko.observable(0),
firstname: ko.observable(initialData.firstname),
lastname: ko.observable(initialData.lastname),
email: ko.observable(initialData.email),
birthday: ko.observable(initialData.birthday),
producerAccount: ko.observable(initialData.producerAccount),
delaSiteType: ko.observable(initialData.delaSiteType),
userid: ko.observable(initialData.userid),
language: ko.observable(initialData.language)
}
在代码的一部分中,我试图将文本框的值绑定到observable。问题是它适用于IE 8,9,10,Chrome,Firefox,但不适用于IE11。
<asp:TextBox CssClass="inputfield M numbersOnly" runat="server" ID="txtPremiumInsured1"
data-bind="value: insuredPersonList()[0].premium, enable: monthlyType() == 'premium'" />