In response to clarified question:
For this purpose, I would use jQuery library which you can freely download from http://docs.jquery.com/Downloading_jQuery
This is a jQuery plug-in good to copy any data to the client's clipboard: http://archive.plugins.jquery.com/project/clipboard
Also, if you need to copy the content of you iframe, please understand that getting any element data statically won't help you, because the real content of the frame is places in a separate resource. You need to download it first, presumably via Ajax.