Homepage : New Document: All Documents: Settings : Setting

Main Document

Title:function copyText( obj ) {
Status:Draft
Body:function copyText( obj ) {

/*create textRange differently
depending what the object is */
if (obj.type=="text" || obj.type=="textarea"){
var rng = obj.createTextRange();
} else {
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
}

rng.scrollIntoView();
rng.select();

if (confirm('Copy the selected text to the ClipBoard?')) rng.execCommand("Copy");
rng.collapse(false);
rng.select();

}
Read more about this technique online: error