From 52cd8ff017abc96c19c3196a8b21920cabcec249 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 12 Jun 2023 16:28:05 +0900 Subject: [PATCH] no message --- src/main/webapp/resources/js/base/base.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/resources/js/base/base.js b/src/main/webapp/resources/js/base/base.js index ee959ba1..6e969f09 100644 --- a/src/main/webapp/resources/js/base/base.js +++ b/src/main/webapp/resources/js/base/base.js @@ -302,13 +302,17 @@ $.fn.onEnterPress = function(handler) { } function labelFor(input) { - var selector = "label[for='{id}']", - key = "string" == typeof(input) ? input - : $(input).attr("id") || $(input).attr("name"); + let selector = "label[for='{id}']", + str = "string" == typeof(input), + obj = $(input), + key = str ? input + : obj.attr("id") || obj.attr("name"); if (!key) return ""; selector = selector.replace(/{id}/gi, key); - return $(selector).text(); + return $(selector).text() + || obj.attr("title") + || obj.attr("placeholder"); } function validationFailureHandler() {