ITeye博客

如何让人家复制自己网站信息自动加上网址,复制页面加上网址特效

txf2004 · 2009-06-24 06:28 · javascript · Markdown

///复制网站内容自动加上网址
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r\n 详细出处参考:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。