사이트 내 전체검색
해당사이트내 본문글을 카피하여 붙여넣기시 공지한 출처내용이 자동으로 표기
로빈아빠
https://cmd.kr/javascript/158 URL이 복사되었습니다.

본문

<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 + ' (출처 : ''+title_js_var+'' - 운영자) ';
        // set data to clibboard
        var result = window.clipboardData.setData('Text', txt);
    }
}
</script>
<script language="JavaScript">var title_js_var = "테크노트";</script>
</head>
<body>
<div id='contents_area' onCopy='javascript:contents_cp();'>
본문내용<br>
<pre>
..........
</pre>
</div>
</body>
</html>

댓글목록

등록된 댓글이 없습니다.

831 (1/17P)

Search

Copyright © Cmd 명령어 3.147.84.71