别人复制你文章时自动加上版权信息,以下是脚本代码: <script type="text/javascript"> document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本文来自: giffer blog(www.giffer.cn) 详细出处参考:"+location.href; clipboardData.setData("text", text); } }, 100 ) } </script> |