日期:2014-05-16  浏览次数:20799 次

jquery ajaxSubmit上传文件 弹出【Object FormData】
	
HTML代码
<tr>
<td align="center" style="font-size:12px">模版上传:</td>
<td>
             <input id="fileUpload" name="fileUpload" type="file" style="width: 400px; background:                White" class="easyui-validatebox" required="true" validType="fileup(this);"/>
</td>
</tr>
<tr>
<td align="center" style="font-size:12px" >图片上传:</td>
<td>
    <input id="imageUpload" name="imageUpload" type="file" style="width: 400px; background: White" class="easyui-validatebox" required="true" validType="imageup(this);"/>
</td>
</tr>

jquery代码
$("#insertForm").ajaxSubmit({
url:"<%=ctxPath%>/template/insertTemplate.ajax",
type: "post", 
dataType: "json", 
async: false, 
timeout:999999,
success:function(data){
if(data.success){
$.messager.alert('提示', data.data.msg, 'info', function() {
$("#btn").hide();
$("#content").html("<img src='<%=ctxPath%>/images/ajax.gif'/>加载中...");
$("#content").hide();
window.location="<%=ctxPath%>/template/listTemplate.jsp";
});
},
error:function(data){
$.messager.alert('提示', data.errorReason.msg, 'error');
$("#btn").show();
 $("#content").hide();
}
});



使用jquery ajaxSubmit上传文件的时候
先弹出【ObjectFormData】 
接着显示处理结果

请问如何去除ObejectFormData的弹出框呀
求大神指点迷津~
如下图:
Ajax HTML javascript

------解决方案--------------------
文件的异步传输,建议用ajaxfileupload.js这个js控件,可以得到你想要的效果 
------解决方案--------------------
检查你的代码,你下载的应该是被别人改过了,忘记注释掉调试时的alert数据了吧。。