比較簡單的複製內容到貼上簿的測試程式碼<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=測試>
<input type=button value=複製onclick=setTxt()>
<input type=button value=讀取onclick=readTxt()>