From 143237aeaffe94325482b7ed76454ac64ac4cc6e Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 2 Sep 2019 20:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=99=E7=AE=B1=E7=8E=AF=E5=A2=83=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sop-website/website-front/pages/sandbox/sandbox.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sop-website/website-front/pages/sandbox/sandbox.js b/sop-website/website-front/pages/sandbox/sandbox.js index 9d53e574..7ee81fc4 100644 --- a/sop-website/website-front/pages/sandbox/sandbox.js +++ b/sop-website/website-front/pages/sandbox/sandbox.js @@ -227,9 +227,16 @@ function postFile(data, formData) { function downloadFile(data) { $('.dl-form').remove(); var url = SopConfig.url + '/sandbox/test'; - var form = $('
').attr("action", url).attr("method", "post"); + var form = $('
') + .addClass('dl-form') + .attr("action", url) + .attr("method", "post"); + for(var key in data) { - form.append($("").attr("type", "hidden").attr("name", key).attr("value", data[key])); + form.append($("") + .attr("type", "hidden") + .attr("name", key) + .attr("value", data[key])); } form.appendTo('body').submit(); }