Tag: 数据映射

获取input绑定的未捕获错误“NO_MODIFICATION_ALLOWED_ERR”

我从这开始: <script src="/Scripts/jquery-1.6.2.min.js" … <script src="/Scripts/knockout-1.2.1.debug.js" … <script src="/Scripts/knockout.mapping-latest.js" … <script src="/Scripts/jquery.unobtrusive-knockout.min.js" … 然后我从服务器拉一个扁平的JSON对象,并将每个find的属性绑定到DOM中的匹配元素: $.ajax({ url: '/GetRecord', type: 'POST', dataType: 'json', data: JSON.stringify(requestObject), contentType: 'application/json; charset=utf-8', success: function (data) { // Clear the current view model VM.Items.length = 0; // only one item coming from server VM.Items[0] = ko.mapping.fromJS(data.BlankItem); // for each property found, bind […]