<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> copy content automatically add the article link address of the JS code </title>
<script type= "text/web Effects" >
Document.body.oncopy = function () {
settimeout (function ()
{
var text = clipboarddata.getdata ("text");
if (text) {
Text = text + "This article comes from [Left Bank] (http://www.111cn.net) Original source:" +LOCATION.HREF;
Clipboarddata.setdata ("text", text);
}
}, 100)
}
</script>
<body>
Fdsafsa
Dagdsaf
S
Af
Sda
F
Sa
<input type= "button" name= "Submit" onclick= ' CopyToClipboard () ' value= ' Copy this page article address, to the Qq/msn friend "width=" "height=" ">
<script language= "JavaScript" >
function CopyToClipboard () {
var clipboardcontent= "";
Clipboardcontent+=document.title;
clipboardcontent+= "";
Clipboardcontent+=this.location.href;
Window.clipboarddata.setdata ("text", clipboardcontent);
Alert ("Copy successful, paste on your qq/msn to recommend to your friends");
} </script>
</body>