반응형
/* copy */
function copyCode(code){
var t = document.createElement("textarea");
document.body.appendChild(t);
t.value = code;
t.select();
document.execCommand('copy'); //카피 명령어
document.body.removeChild(t);
}
반응형
'자바스크립트' 카테고리의 다른 글
자바스크립트 유사배열객체를 배열로 변경,돔 배열로 변경 (0) | 2020.12.09 |
---|---|
셀렉트박스의 text 값과 value 값을 가져오는 방법 (0) | 2020.12.07 |
자바스크립트 blur( 유효성검사,벨리데이션 체크 ) , json for 문 돌리기 (0) | 2020.12.07 |
자바스크립트 배열 중복제거 (0) | 2020.12.07 |
자바,자바스크립트 list를 json으로 json을 object로 변환 (0) | 2020.07.07 |
댓글