//document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本篇文章来源于 “中国气体分离设备商务网”"+location+""; clipboardData.setData("text", text); } }, 100 ) } document.body.oncopy = function () { setTimeout(oncopy,100); } function oncopy() { var text = clipboardData.getData("text"); var domain; var tempstr; if (text) { //tempstr="cnbyxf.com" tempstr=location.hostname.toString(); tempstr=tempstr.replace("www.",""); if (tempstr=="cnbyxf.com") { domain="中国变压吸附设备商务网"; } else if(tempstr=="cnrjyq.com") { domain="中国溶解乙炔设备商务网"; } else { domain="中国气体分离设备商务网"; } //alert(domain); text = text + "\r\n本篇文章来源于 “" + domain + "”"+location+""; clipboardData.setData("text", text); } }