mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
25 lines
569 B
HTML
25 lines
569 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Clipboard.js</title>
|
|
</head>
|
|
<body>
|
|
<p id="paragraph">Lorem ipsum dolor.</p>
|
|
<button class="btn" for="paragraph" type="button">Copy</button>
|
|
|
|
<form>
|
|
<input id="target" type="text" value="qwe">
|
|
<button class="btn" for="target" type="button">Copy</button>
|
|
</form>
|
|
|
|
<script src="dist/clipboard.min.js"></script>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
new Clipboard('.btn');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|