-2

Is there ANY way to copy to a computer's clipboard WITHOUT using document.execCommand() ?

  • 2
    Possible duplicate of [How do I copy to the clipboard in JavaScript?](https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript) – Ingo Bürk Mar 14 '18 at 07:23
  • Reading between the lines, it sounds like you have already tried `document.execCommand()` and it didn't work. You are more likely to get useful answers if you describe what you've done, what platform you're working on and generally why you want some other solution. – JJJ Mar 14 '18 at 07:27

1 Answers1

-1

you can get the files from here Clipboard.js

<p id="docopy2">Your content comes here </p>
</p>
<button onclick="copyToClipboard('#docopy2')">Copy</button><br><br><br>
Mohsin
  • 189
  • 4
  • 17