网页常用分享代码大全(前端必备)

所属分类: 网页制作 / 应用技巧 阅读数: 386
收藏 0 赞 0 分享


复制代码
代码如下:

1、新浪微博
<a href="http://v.t.sina.com.cn/share/share.php?url=https://www.jb51.net&title='分享内容'" target="_blank">新浪微博</a> </p> <p>2、腾讯微博
<a href="http://v.t.qq.com/share/share.php?url=https://www.jb51.net&title='分享内容'" target="_blank">腾讯微博</a> </p> <p>3、开心网
<a href="javascript:window.open('http://www.kaixin001.com/repaste/share.php?rtitle='+encodeURIComponent(document.title)+'&rurl='+encodeURIComponent(document.location.href)+'&rcontent=');void(0)">开心网</a>
或者用
<a href="http://www.kaixin001.com/repaste/share.php?rurl=https://www.jb51.net&rcontent=http://www.baidu.com&rtitle=kaixin" target="_blank">开心网</a> </p> <p>4、豆瓣网
<a href="javascript:window.open('http://www.douban.com/recommend/?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title));void(0)">豆瓣</a> </p> <p>或者用
<a href="http://www.douban.com/recommend/?url=https://www.jb51.net&title=douban" target="_blank">豆瓣</a> </p> <p>5、人人网
<a href="javascript:window.open('http://share.renren.com/share/buttonshare.do?link='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title));void(0)">人人网</a>
或者用
<a href="http://share.renren.com/share/buttonshare.do?link=https://www.jb51.net" target="_blank">人人网</a> </p> <p>6、百度贴吧
<a href="http://tieba.baidu.com/f/commit/share/openShareApi?url=https://www.jb51.net&title=hello&desc=&pic=" target="_blank">百度贴吧</a> </p> <p>7、QQ好友
<a href="http://connect.qq.com/widget/shareqq/index.html?title=qqhaoyou&url=https://www.jb51.net&desc=还不错哦&pics=&site=优酷" target="_blank">QQ好友</a> </p> <p>8、QQ空间
<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=https://www.jb51.net" target="_blank">QQ空间</a> </p> <p>9、腾讯朋友
<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?to=pengyou&url=https://www.jb51.net" target="_blank">腾讯朋友</a> </p> <p>
10、百度收藏
<a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0">百度搜藏</a> </p> <p>11、优酷空间
<a href="http://i.youku.com/u/share/?url=https://www.jb51.net&content='分享内容'" target="_blank">优酷空间</a> </p> <p>12、搜狐微博
<a href="http://t.sohu.com/third/post.jsp?content=utf-8&url=https://www.jb51.net&title=souhu" target="_blank">搜狐微博</a> </p> <p>13、MSN
<a href="http://profile.live.com/badge/?url=https://www.jb51.net&Title=msn" target="_blank">MSN</a> </p> <p>14、猫扑
<a href="http://tt.mop.com/share/shareV.jsp?title=moptietie&pageUrl=https://www.jb51.net" target="_blank">MOP贴贴</a> </p> <p>15、网易微博
<a href="http://t.163.com/article/user/checkLogin.do?link=https://www.jb51.net" target="_blank">网易微博</a> </p> <p>16、QQ书签 </p> <p><a href="javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)">QQ书签</a> </p> <p>17、GOOGLE书签:
<a href="javascript:window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title));void(0)">Google</a> </p> <p>18、Twitter
<a href="javascript:window.open('http://twitter.com/home?status='+encodeURIComponent(document.location.href)+' '+encodeURIComponent(document.title));void(0)">Twitter</a> </p> <p>19、Facebook
<a class="fav_facebook" rel="nofollow" href="javascript:window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(document.location.href)+'&t='+encodeURIComponent(document.title));void(0)">Facebook</a> </p> <p>20、Delicious书签: </p> <p><a href="javascript:window.open('http://del.icio.us/post?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title)+'&notes=');void(0)">Delicious</a>


由于现在很多分享平台都出来了,而且兼容性更好,一般多选择  百度分享等第三方分享平台。大家可以看下。

更多精彩内容其他人还在看

CSS中浏览器对尺寸和宽高解释差异的解决方法

不同的浏览器对margin、padding、height、width 等属性的解释有很大的偏差。有时我们发现同样的两列布局,在不同的浏览器中两列长短不一,类似的情况太多了,如此困扰大家的麻烦,如何解决?
收藏 0 赞 0 分享

网页变灰的笔记 细节问题处理

grayscale.js这个文件是用来兼容各个浏览器的,在一般情况下,使用它绝对不会有问题,但是在实际的操作中,还是遇到了一些麻烦。
收藏 0 赞 0 分享

页面中marquee与flash同时存在时的冲突解决方案

冲突的症状主要表现在FLASH按钮一直跳动,不稳定,影响网页美观及正常访问。
收藏 0 赞 0 分享

提高网站访问速度的六种方法

以下6种优化方法都是前端的,前端优化的意义在于减少http请求,减少网站前端程序组成的体积。
收藏 0 赞 0 分享

新鲜出炉的有用图标集25组 国外下载

恰当的图标(ICON)能使网站更具活力 曾几何时,现在的网站图标大同小异,我们的眼睛早已见惯不惊。于是,这里收集了25套专业设计的全新的图标集,希望对你有用!
收藏 0 赞 0 分享

新手建站教程 十天学会做网站

十天学会做网站教程采用最通俗易懂的语言、从最基本的开始,带领大家开始建站。教程由许耀鹏历时半年时间写成。是非常好的新手建站入门教程。
收藏 0 赞 0 分享

新手建站入门教程 建站需要的条件和工具

很多新手在论坛都会说,我从来没做过网站,做网站需要些什么条件啊,会不会很难啊?
收藏 0 赞 0 分享

新手建站入门教程 域名的解析与绑定

昨天我们讲到了建立一个属于自己的网站需要的条件和工具,里面讲到首先需要注册一个属于自己的域名,和需要购买一个虚拟主机。(详情请看:新手建站第一帖:建站需要的条件和工具)
收藏 0 赞 0 分享

新手建站入门教程③ 别名(CNAME)记录和URL转发

在上一帖中为大家介绍了域名的解析和A记录解析的方法,今天我就为大家讲解一下另一种解析方法:别名(CNAME)记录。同时为大家讲解下URL转发的好处和方法。
收藏 0 赞 0 分享

新手建站入门教程④:如何绑定子目录

去买空间的时候,我想很多朋友都已经注意到了,有的空间介绍上会有类似于“支持绑定1个子目录”、“赠送1个子目录”等词。那么这些介绍是什么意思呢?
收藏 0 赞 0 分享
查看更多