复制内容自动加上链接

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

<script>
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "
本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
</script>

复制内容自动加上链接》上有 0 条评论

  1. buxuku

    <script>
    document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "
    本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
    </script>

  2. hmo

    <script>
    document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "
    本文来自 长河日志 YL'S blog:"+location.href; clipboardData.setData("text", text); } }, 100 ) }
    </script>
    本文来自 长河日志 YL'S blog:http://www.80y.com.cn/read-974.html

发表评论

邮箱地址不会被公开。 必填项已用*标注

click to changeSecurity Code