欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > 织梦模板实现分享到各大网站的功能

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:502

织梦模板实现分享到各大网站的功能

发布时间:2021-05-17  

我们可以想在dede系统的文章下面加个分享功能:

比如,把网站内容分享到某些大网站.象百度啊 ,QQ啊.

非常好的功能,可以在不知不觉中增加你的外链,提高你网站的流量。

实际上功能实现起来并不复杂。

下面都是一些可以直接使用的js代码。

只要将这些代码添加到dede模板的相应位置即可。

分享到QQ书签

<a href=javascript:window.open('" alt="QQ书签" border="0" height="16" width="16"></a>

 

分享到百度收藏。

<a href="javascript:u=location.href;t=document.title;c = %22%22 + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=%22" alt="百度搜藏" border="0" height="16" width="16"></a>

 

分享到google书签。

 

<a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();"><img src=http://www.weixuecn.cn/article/"更换成自己的图片地址/images/google.gif" alt="Google书签" border="0" height="16" width="16"></a>

 

分享到雅虎收藏

<a href="#"><img src="更换成自己的图片地址/images/yahoo.gif" alt="雅虎收藏" border="0" height="16" width="16"></a>

 

分享到校内网

<a href="javascript:void((function(s,d,e){if(/xiaonei.com/.test(d.location))return;var%20f='*****hare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));"><img src="更换成自己的图片地址/images/renren.gif" alt="分享到校内人人网" border="0" height="16" width="16"></a>

 

分享到开心网

<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('" alt="转贴到开心网" border="0" height="16" width="16"></a>

 

转帖到服务易

<A title=分享到服务易 href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('?mod=spacecp&ac=share&fchannel=xmenus&u='+escape(d.location.href)+'&t='+escape(d.title),'fuwuyi'));fuwuyi.focus();"><IMG alt=转帖到服务易 src=http://www.weixuecn.cn/article/"http:/www.fuwuyi.cn/favicon.ico" align=absMiddle border=0><FONT color=#996699>服务易</FONT></A>