<div>测试内容</div>
document.body.oncopy = function ()
{
setTimeout(
function ()
{
var text = clipboardData.getData("text");
if (text)
{
text = text + "\r\n来源:本人博客(http://blog.**.net)"+location.href;//location.href是当前访问路径
clipboardData.setData("text", text);
}
},
100 )
}
本文探讨了测试内容的具体细节,深入分析了如何在文档复制时自动附加来源信息,确保内容传播的同时保留作者信息。
2933

被折叠的 条评论
为什么被折叠?



