當復制文章內容時,自動加版權與文章詳細頁網址的實現方法:
將下面的js代碼插入到文章內容頁模板的<head>與</head>標簽中間就行
<script language=”javascript” type=”text/javascript”><!–document.body.oncopy = function () {setTimeout( function () {var text = clipboardData.getData(“text”);if (text) {text = text + “/r/n文章來自:darren中詳文參考:”+location.href;clipboardData.setData(“text”, text);}}, 100 )}–></script> 只需要寫上上面的版權代碼,那么功能就已經OK了.
新聞熱點
疑難解答