From ffbc43a7cd975bc977af239389332c98f1e0f123 Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 19 May 2021 15:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=8E=B7=E5=8F=96=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/common/js/common.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index b89ce809f..580e771f2 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -106,21 +106,22 @@ function GetFormVal(element, is_json) { if($(this).is(':selected')) { - // 多选择 + var value = (tmp.value == undefined) ? '' : tmp.value; if($(this).parents('select').attr('multiple') != undefined) { + // 多选择 if(tmp_all[name] == undefined) { tmp_all[name] = []; i = 0; } - tmp_all[name][i] = tmp.value; + tmp_all[name][i] = value; i++; } else { // 单选择 if(object[name] == undefined) { - object.append(name, tmp.value); + object.append(name, value); } } }