在提交下面的表单时,我收到的回复不是在我的预期字段中下载。我在这里做错了吗?
function sendFile(formimg,editor,welEditable) {
alert("inside send");
var iframe = $('<iframe name="postiframe" id="postiframe" style="display: none" />');
$("body").append(iframe);
alert("1");
$('#' + formimg).attr("action", "UploadServlet");
$('#' + formimg).attr("method", "post");
$('#' + formimg).attr("enctype", "multipart/form-data");
$('#' + formimg).attr("encoding", "multipart/form-data");
$('#' + formimg).attr("target", "postiframe");
$('#' + formimg).submit();
alert("2");
$("#postiframe").load(function () {
iframeContents = $("#postiframe")[0].contentWindow.document.body.innerHTML;
return iframeContent;
});
return false;
}