클립보드_복사
description :
author : 도봉산핵주먹
email : hylee@repia.com
lastupdate : 2020-06-02
Code
<head>
<script>
$( document ).ready(function(){
$('#codeCopy').click(function(){
$('#RssCode').select()
document.execCommand("copy");
alert("imgSrc Code를 복사하였습니다.");
});
$('#onerrorCopy').click(function(){
$('#onerror').select()
document.execCommand("copy");
alert("onerror를 복사하였습니다.");
});
});
</script>
</head>
<body>
<div class="card card-success">
<form>
<div style="float:right; padding-right:20px;">
<input type="text" size="50" id="onerror" name="onerror" value=" onerror='this.style.display='none''">
<button type="button" class="btn btn-success" id="onerrorCopy">Copy</button>
<input type="text" size="50" id="RssCode" name="RssCode" value="imgSrc = 'repia'">
<button type="button" class="btn btn-success" id="codeCopy">copy</button>
</div>
</form>
</div>
</body>
Tip
Ref