复制内容自动加上链接

JS代码为下面的,放到内容处即可

<script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
</script>
评论: 2 | 引用: 0 | 阅读: 280
  • 1 
buxuku [ 2008-04-25 03:32 | 回复 | 编辑 删除 ]
<script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
</script>
hmo [ 2008-01-04 19:41 | 回复 | 编辑 删除 ]
<script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
</script>
本文来自 长河日志 YL'S blog:http://www.lossr.net/read-974.html
  • 1 
发表评论
昵 称: 密 码:
网 址: 邮 箱:
验证码: 验证码图片 选 项:
内 容: