Here is a small JS snippet to copy text in a div to the client machine's clipboard.
function CopyToClipBoard()
{
var div = document.getElementById('divLink');
div.contentEditable = true; //very important.
var range = document.body.createControlRange();
range.addElement(document.getElementById('divLink'));
range.select();
range.execCommand("Copy");
range.remove(0);
range.select();
alert("The results have been copied to the clipboard.");
div.contentEditable = false;
return false;
}