Copy text to clipboard using Javascript


Over the past few days I've tried a million ways to do something relatively simple: copy text from a textarea into the user's clipboard. Alas, none of them worked for my needs (including zeroclipboard) and I was about to give up when I finally found a working solution from Prying Minds - yay!