---
title: "如何让人家复制自己网站信息自动加上网址，复制页面加上网址特效"
author: "txf2004"
date: "2009-06-24T06:28:00Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-09-18T21:18:38Z"
id: 471183
url: "https://txf2004.iteye.com/blog/471183"
---

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