From 9a78e2662cba326a4ba0831a1ef580ff1ddd4810 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 23 Feb 2022 17:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20=E4=B8=A5=E6=A0=BC=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/file.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index e9b1a5a2a..50ec58bdc 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -333,11 +333,10 @@ if (isFunction(handler.onloadstart)) { handler.onloadstart(rpe, {}); } - with (document.body || document.documentElement) { - appendChild(iframe); - appendChild(form); - form.submit(); - } + var d = document.body || document.documentElement; + d.appendChild(iframe); + d.appendChild(form); + form.submit(); return handler; }; @@ -652,7 +651,7 @@ }); }, - setMaxFileLength: function(v) { + setMaxFileLength: function (v) { this.options.maxLength = v; if (this.wrap) { this.wrap.maxLength = v;