日期:2014-05-16  浏览次数:20358 次

在复制文章时JS插入版权信息及链接

// 版权信息
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n文章源自:"+location.href; clipboardData.setData("text", text); } }, 100 ) }