给“飞奔汽车”这4字加链接,我试多次没成功------------------------------------------------------------
//复制内容自动添加版权信息
var thehits=document.getElementById("thehit");
if (thehits!=null){
thehits.innerHTML="22936";
}
document.body.oncopy = function ()
{
setTimeout(
function ()
{
var text = clipboardData.getData("text");
if (text)
{
text = text + "\r\n本文来自【飞奔汽车】:"+location.href;
clipboardData.setData("text", text);
}
},
100
)
}
window.onload = function()
{
this.focus();
}

解决方案 »

  1.   

    text = text + "<a href='"+ location.href +"'>本文来自【飞奔汽车】:</a>";
      

  2.   

    oncopy 好像只在 IE6 下有效
      

  3.   

    不好意思,,刚说错了目前完美支持复制到剪贴板 的 好像只有 flash
      

  4.   

    按这个办法弄text = text + "<a href='"+ location.href +"'>本文来自【飞奔汽车】:</a>"+location.href;粘贴到Dreamweaver 8效果是这样的:p>&lt;a href='http://www.kjgh.com'&gt;本文来自【飞奔汽车】:&lt;/a&gt;http://www.kjgh.com/j/cngsi/180.htm</p>