复制网页内容自动加入版权内容代码,请放在body之间任意位置,可以尝试复制本文内容预览效果,firefox无效。
以下为代码内容:
< script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "rnrn该文章转自[CSWL官方博客-bbs.cswl.top ]原文链接:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
< /script>
请先登录后发表评论!