我使用了一个带有uploadify控件的div,然后使用jsrender绑定数据进行编辑,但是当我想删除div以取消IE中的编辑时,错误提示“需要对象”,然后失败。谁知道为什么,请告诉我,谢谢!主要代码:
function edit(){
$("#id").html($("#editTmpl").render(data));
uploadify init
}
function cancelEdit(){
$("#id).remove();
}
html代码:
<div id="editTmpl" type="text/x-jsrender">
<div class="editRow rowEdit communityDraw">
<dl>
<dt>drawing:</dt>
<dd class="divDrawingsContainer" data-id="{{>CommunityId}}">
<div class="attachmentToolbar"><span>
<input id="file_upload-{{>CommunityId}}" type="file" /></span></div>
<div id="uploadingFiles-{{>CommunityId}}"></div>
<div id="divDrawingsDisplayBody-{{>CommunityId}}"></div>
</dd>
</dl>
<i class="clearfloat"></i>
</div><div class="editRow rowEdit communityDraw">
<dl>
<dt>drawing:</dt>
<dd class="divDrawingsContainer" data-id="{{>CommunityId}}">
<div class="attachmentToolbar"><span>
<input id="file_upload-{{>CommunityId}}" type="file" /></span></div>
<div id="uploadingFiles-{{>CommunityId}}"></div>
<div id="divDrawingsDisplayBody-{{>CommunityId}}"></div>
</dd>
</dl>
<i class="clearfloat"></i>
</div>
<div>