Last active
March 16, 2022 04:32
-
-
Save esctabcapslock/1e8af04b3759a223f8ce69e166dd30c4 to your computer and use it in GitHub Desktop.
자바스크립트 복사
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//자바스크립트에서 복사하는 코드임 | |
//사용자 동의 없이 복사 안됨에 주의! | |
function copy2(data) { | |
var aux = document.createElement("input"); | |
aux.setAttribute("value", data); | |
document.body.appendChild(aux); | |
aux.select(); | |
document.execCommand("copy"); | |
document.body.removeChild(aux); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment