자동 출처 복사

지지온 2012.06.16 10:30:55 출처:

<script language="javascript">
function contents_scp(sdz)
{
if (window.event)
{
window.event.returnValue = true;
window.setTimeout('attach_sdref("'+sdz+'")', 25);
}
}
function attach_sdref(sdz)
{
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(출처 :  '+sdz+')';  // set data to clibboard
var result = window.clipboardData.setData('Text', txt);
}
}
</script>
<div oncopy='contents_scp("");'>
내용
</div>