how to make a function to copy text to clipboard in javascript
Answers
Answered by
2
Answer:
Create a textarea and set its contents to the text you want copied to the clipboard.
Append the textarea to the DOM.
Select the text in the textarea.
Call document.execCommand("copy")
Remove the textarea from the dom.
Similar questions