From c1b35f209212d8227a25b84c589912b8fb1e9ee0 Mon Sep 17 00:00:00 2001 From: Devil Date: Tue, 18 May 2021 21:35:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=20select=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE=E4=BC=98=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, 5 insertions(+), 2 deletions(-) diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 52963c859..b89ce809f 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -104,7 +104,7 @@ function GetFormVal(element, is_json) var name = $(this).parents('select').attr('name'); if(name != undefined && name != '') { - if($(this).is(':selected') && tmp.value != undefined && tmp.value != '') + if($(this).is(':selected')) { // 多选择 if($(this).parents('select').attr('multiple') != undefined) @@ -118,7 +118,10 @@ function GetFormVal(element, is_json) i++; } else { // 单选择 - object.append(name, tmp.value); + if(object[name] == undefined) + { + object.append(name, tmp.value); + } } } }