复制文章在最后面出现文章转载来自XXX网的代码
发布:溪梦缘曦 | 发布时间: 2008-12-13
复制页面内容后自动在后面加上网站信息,有利于SEO
可以将代码放在网页任意地方
<script type="text/javascript">
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r\n本篇文章来源于Lancui's BLOG:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}
</script>
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r\n本篇文章来源于Lancui's BLOG:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}
</script>
评论:0条 |
浏览:
- 相关文章:
- 00
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论





