In this article, we'll show how to do it.
document.execCommand("copy") if the first method is not supported by the browser.
document.execCommand('copy') is deprecated but some browsers still support that command.
copyToClipboard function copies a string to the clipboard. This function must be called from within an event handler for example
The function may return false if it failed.