文章被复制时自动添加网站地址
[ 2010-04-09 22:03:07 | 作者: admin ]
<script type="text/javascript">
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r\n 参考网站:"+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 参考网站:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}
</script>
1