织梦CMS教程:复制网页内容时自动加入版权内容代码
复制网页内容自动加入版权内容代码,请放在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>
责任编辑:天外飘仙
踩一下[0]
顶一下[0]