织梦复制文章带上“文章来自+文章网址

2017-04-13 14:27:57 dedecms

在<head></head>之间加上这样一段代码就OK了。。。 

<script language="Javascript" type="text/Javascript"> <!-- document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { texttext = text + "\r\n文章来自:"+location.href;clipboardData.setData("text", text); } }, 100 ) } --> </script>