<iframe src="" id="downfile" name="downfile" style="display:none;"></iframe>
var $iframe = $('#downfile');
var $form = $('<form target="downfile" method="post" />');
$form.attr('action', './excel');
// canvas转化的图片
// var picSrc = canvas.toDataURL("image/jpeg");
$form.append($("<input/>").attr("type", "hidden").attr("name", "pic").attr("value", picSrc));
$form.append($("<input/>").attr("type", "hidden").attr("name", "filename").attr("value", fileName));
$form.append($("<input/>").attr("type", "hidden").attr("name", "rownum").attr("value", rowNum));
$form.append($("<input/>").attr("type", "hidden").attr("name", "condition").attr("value", JSON.stringify(selectInfo).replace(/\"/g, "\'")));
$form.append($("<input/>").attr("type", "hidden").attr("name", "copydata").attr("value", JSON.stringify(copyData).replace(/\"/g, "\'")));
$iframe.append($form);
$form.submit();
$form.remove();
// JSON对象转化为字符串后,将双引号改为单引号
// JSON.stringify(selectInfo).replace(/\"/g, "\'")
// 图片相关处理JAVA
Base64 base64 = new Base64();
byte[] imgByte = base64.decode(picString.substring("data:image/jpeg;base64,".length()));