好吧,我不认为我使用了正确的术语,但我会尝试解释相同的。我们有一个使用远程处理来自服务器的数据数组。现在我们正在使用 JSViews 将相同的内容添加到带有更新按钮的可编辑表单中。按下此按钮后,需要将数据发送回服务器。
我们成功地绑定了数据,但是当我们记录数据时,我们在数组和每个元素中看到了一个额外的属性“ jQuery19105520686232484877 ”。
{Name: "Cheese Production Facility", RecordTypeId: "012i0000000C1lHAAS", Id: "a01i00000057WQMAA2", Number_of_Sites__c: 0, jQuery19105520686232484877: Object}
有没有一种方法可以从初始数组中删除“ jQuery19105520686232484877 ”属性?
使用的模板
<li data-role="fieldcontain">
<label for="propertyName">Name:</label>
<input type="text" name="propertyName" data-link="Name" id="propertyName" value="" data-clear-btn="true"/>
</li>
<li data-role="fieldcontain">
<label for="dist">Dist:</label>
<input type="text" name="dist" id="dist" data-link="Total_Number_of_Acres__c" value="" data-clear-btn="true"/>
</li>
JS代码
var propInfoObject = {
Name: "Cheese Production Facility",
RecordTypeId: "012i0000000C1lHAAS",
Id: "a01i00000057WQMAA2",
Number_of_Sites__c: 0
};
$.templates("#editPropertyTemplate").link("#editPropertyContent",propInfoObject);