From bd212b3250bbeb4b4864f5ac60cd6a807066caee Mon Sep 17 00:00:00 2001 From: leebj Date: Thu, 1 Aug 2024 14:25:07 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A9=EB=B6=80=EC=9E=90=EB=B2=88=ED=98=B8?= =?UTF-8?q?=20=EB=B3=B5=EC=82=AC=20=ED=95=A8=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/sprt/sprt01010-main.jsp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp index ce4cc0d6..25434a90 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp @@ -379,7 +379,20 @@ $(document).ready(function() { } if(cur != null){ - navigator.clipboard.writeText(cur.RTPYR_NO); + + if(window.isSecureContext){ + navigator.clipboard.writeText(cur.RTPYR_NO); + } else { + var textArea = document.createElement("textarea"); + textArea.style.position = "fixed"; + textArea.value = cur.RTPYR_NO; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + } + $("#toastText--${pageName}").html("납부자번호가 복사되었습니다."); $P.toast.show(); }