复制网页内容主动参加版权内容代码,请放在body之间任意地位,能够尝试复制本文内容预览后果,firefox无效。
以下为代码内容:
< script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "rnrn该文章转自[飘仙建站网-PIAOXIAN.COM] 原文链接:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
< /script>