23
Sep, 2024
No products in the cart.
js
function copy() {
let textarea = document.getElementById("textarea");
textarea.select();
document.execCommand("copy");
}
html
<textarea id="textarea"></textarea>
<br>
<button onclick="copy()">Copy</button>