A relatively simple test code for copying content to the pasteboard <script language=javascript>
function readTxt()
{
alert(window.clipboardData.getData(text));
}
function setTxt()
{
var t=document.getElementById(txt);
t.select();
window.clipboardData.setData('text',t.createTextRange().text);
}
</script>
<input name=txt value=test>
<input type=button value=copy onclick=setTxt()>
<input type=button value=read onclick=readTxt()>