jQuery實現點擊復制效果


<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>target-input</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>


<input id="foo" type="text" value="hello">
<button class="btn" data-clipboard-action="copy" data-clipboard-target="#foo">Copy</button>

<script src="../extend/copy/clipboard.min.js"></script>

<script>
     var clipboard = new Clipboard('.btn');
</script>


</body>

</html>

 

 

2019-03-13


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM