將以下代碼添加頁(yè)腳的 </body> 前面即可:
- ? ?<script type=“text/javascript”>
- ? ?function?addLink()?{
- ????var?selection?=?window.getSelection();
- ????pagelink?=?“. 原文出自[國(guó)外主機(jī)測(cè)評(píng)] 轉(zhuǎn)載請(qǐng)保留原文鏈接: “?+?document.location.href;
- ????copytext?=?selection?+?pagelink;
- ????newdiv?=?document.createElement(‘div’);
- ????newdiv.style.position?=?‘absolute’;
- ????newdiv.style.left?=?‘-99999px’;
- ????document.body.appendChild(newdiv);
- ????newdiv.innerHTML?=?copytext;
- ????selection.selectAllChildren(newdiv);
- ????window.setTimeout(function?()?{
- ????????document.body.removeChild(newdiv);
- ????},?100);
- }
- document.oncopy?=?addLink;
- </script>
對(duì)于DUX主題,可以添加在主題設(shè)置中:
以上代碼適用于 WordPress 或 zblog 等站點(diǎn),如果是 zblog 站點(diǎn),記得在后臺(tái)點(diǎn)擊[清空緩存并重新編譯模板]才行哦。






外主機(jī)優(yōu)惠VPS-scaled.png)
商宣傳橫圖內(nèi)容提煉-scaled.png)

推薦-scaled.png)












