织梦复制网站文章内容自动加版权代码教程
发布时间:2022-09-02 10:46:52 所属栏目:教程 来源:互联网
导读:当复制文章内容时,自动加版权与文章详细页网址的实现方法: 将下面的js代码插入到文章内容页模板的head与/head标签中间就行 01 script language=javascript type=text/javascript 02 !-- 03 document.body.oncopy = function () { 04 setTimeout( function
当复制文章内容时,自动加版权与文章详细页网址的实现方法: 将下面的js代码插入到文章内容页模板的<head>与</head>标签中间就行 01 <script language="javascript" type="text/javascript"> 02 <!-- 03 document.body.oncopy = function () { 04 setTimeout( function () { 05 var text = clipboardData.getData("text"); 06 if (text) { 07 texttext = text + "rn文章来自:www.80zhan.com织梦模板详文参考:"+location.href; 08 clipboardData.setData("text", text); 09 } 10 }, 100 ) 11 } 12 --> 13 </script> (编辑:鞍山站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |