别人复制文章,自动在后面添加链接,禁止复制文章

迅恒数据中心

加上下面这段:

<script type="text/javascript">
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "/r/n本文来自: - 中小学教育网 - (www.seewww.cn) 文章出处参考:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}
</script>
 

分类:建站知识 百度收录 必应收录