I have never used it, but there is a jQuery clipboard plugin that can satisfy your needs. It looks like he copied something to the clipboard, but the cross browser should work. The code will be something like
$.clipboard($('#tableContainer').html());
Edit: I just noticed that this solution would require non-IE browsers to install Flash, which is as inconvenient as possible and makes it unusable in the worst case. The only way I could think of doing this without having access to the clip browser would be to display the hidden textarea control with the results of this call:
$('#tableContainer').html()
and then allow the user to select all the text and copy it. This will work, but not as elegantly as the plugin solution.
source
share