mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Adds support for any HTML element
This commit is contained in:
22
index.html
Normal file
22
index.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!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.js"></script>
|
||||
|
||||
<script>
|
||||
new Clipboard('.btn');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user