本代碼適用于zblog, <script type="text/javascript"> 下面的這個代碼適用于所有程序(可能是,,自己測試)超級牛逼,,可以突破火狐,,360等瀏覽器 <script type="text/javascript">function addLink(){var copyright="原文地址:{url}<br>內(nèi)容來源:********";var reg=new RegExp("{title}","g");copyright=copyright.replace(reg,document.title);reg=new RegExp("{url}","g");copyright=copyright.replace(reg,document.location.href);var body_element=document.getElementsByTagName("body")[0];var selection;selection=window.getSelection();var pagelink="<br />"+copyright;var copy_text=selection+pagelink;var new_div=document.createElement("div");new_div.style.left="-99999px";new_div.style.position="absolute";body_element.appendChild(new_div);new_div.innerHTML=copy_text;selection.selectAllChildren(new_div);window.setTimeout(function(){body_element.removeChild(new_div)},0)}document.body.oncopy=addLink;</script> |
|