---
title: "内容复制后增加版权信息"
author: "haimav"
date: "2009-09-28T18:08:24Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-09-28T18:08:24Z"
id: 479751
url: "https://haimav.iteye.com/blog/479751"
---

&lt;body &gt;  
[www.xinwanglu.cn](http://www.xinwanglu.cn "新网路") 新网路  
&lt;!-----插入的版权信息广告内容(当别人复制的时候显示-------&gt;

&lt;script type="text/javascript"&gt;  
document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\\r\\n本篇文章来源于心奇网 (www.yy66.net) 原文出处："+location.href; clipboardData.setData("text", text); } }, 100 ) }  
&lt;/script&gt;

&lt;/body&gt;