I just stumble on a piece of code which I never saw before (granted I can't call myself a JS expert):
document.execCommand('Copy');
which seems to copy the clipboard contents to the element in focus.
Q: Is this functionality available cross-browser?
Edit 1: I found this interesting link. The page shows a compatibility matrix for document.execCommand
.