티스토리 뷰

<html>
<head>
<title>드래그 복사</title>

<script language=JavaScript>
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(출처 : http://www.iambloger.com)\r\n';

// set data to clibboard
var result = window.clipboardData.setData('Text', txt);
}
}
</script>
</head>

<body>

<div id='contents_area' onCopy='javascript:contents_cp();'>
여기를 마우스로 드래그 해서 복사한 다음 다른 곳에 붙여넣기를 해보세요.
</div>

</body>

출력할 메시지는 출처 : http://www.iambloger.com 부분을 수정하면 됩니다.
그리고 아래의 레이어 안에 존재하여야 합니다.

<div id='contents_area' onCopy='javascript:contents_cp();'>
여기를 마우스로 드래그 해서 복사한 다음 다른 곳에 붙여넣기를 해보세요.
</div>

(출처 : HappyCGI)

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함