<script type='text/javascript' src="https://cdn.staticfile.org/clipboard.js/1.5.15/clipboard.min.js"></script>1
<div class="copyBtn" data-clipboard-text="来呀~快活呀,反正有~大把头发~">一键复制</div>
var clipboard = new Clipboard('.copyBtn').on('success', function(e) {
var e = e || window.event;
console.log(e);
}).on('error', function(e) {
});