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(); }