글 퍼갈때 클립보드에 카피라이트까지 복사시키기

<script>
function contents_cp()
{
if (window.event)
{
window.event.returnValue = true;
window.setTimeout(‘attach_kinref()’, 25);
}
}
function attach_kinref()
{
if (window.clipboardData) // IE
{
// get data from clipboard
var txt = window.clipboardData.getData(‘Text’);
// attach the source at the end of text
txt = txt + ‘\r\n\r\nⓒ dohoons.com, 무단 전재 및 재배포 금지’;
// set data to clibboard
var result = window.clipboardData.setData(‘Text’, txt);
}
}
</script>

여기까지 <head> ~ </head> 사이에 넣고
<body> 에 oncopy=”contents_cp();” 를 추가한다.

인터넷 신문 사이트 등에서 보던 스크립트인데 하나 퍼왔다.
저것을 적용하고 글을 드래그해서 복사하면 복사한 내용에 카피라이트가 붙는다.