sns
把页面分享到开心网,人人网,新浪围脖,QQ书签,百度搜藏
现在web2.0时代,把帖子分享到国内比较火的sns社区获取可以获得更多的人气回报,下面的代码将分享当前页面到开心网 kaixin001.com ,人人网 renren.com ,新浪微博 t.sina.com.cn
代码如下
CSS样式
#snsshare a { color: #000000; text-decoration: none; font-size: 12px; font-weight: normal } #snsshare span { padding: 5px 5px 0px 5px; font-size: 12px; margin: 0 0 0 10px; cursor: pointer; } #snsshare img { border: 0px; }
javascript 代码
function share(s) { if (s == 0) { window.open('http://v.t.sina.com.cn/share/share.php?title=' + encodeURIComponent(document.title.substring(0, 76)) + '&url=' + encodeURIComponent(location.href) + '&rcontent=', '_blank', 'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); } else if (s == 1) { window.open('http://www.kaixin001.com/repaste/share.php?rtitle=' + encodeURIComponent(document.title.substring(0, 76)) + '&rurl=' + encodeURIComponent(location.href) + '&rcontent=', '_blank', 'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); } else if (s == 2) { window.open('http://share.renren.com/share/buttonshare.do?title=' + encodeURIComponent(document.title.substring(0, 76)) + '&link=' + encodeURIComponent(location.href) + '&content=', '_blank', 'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); } else if (s == 3) { 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=no,resizable=yes'); } else if (s == 4) { window.open('http://cang.baidu.com/do/add?it=' + encodeURIComponent(document.title.substring(0, 76)) + '&iu=' + encodeURIComponent(location.href) + '&fr=ien#nw=1', '_blank', 'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); } }
HTML代码
<div id="snsshare"> <a href="javascript:share(0);" > <span> <img alt="转发到新浪微博" src="http://t.sina.com.cn/favicon.ico" align="absMiddle" > 转发到新浪微博</span> </a> <a href="javascript:share(1)" > <span> <img alt="转帖到开心网" src="http://img1.kaixin001.com.cn/i/favicon.ico" align="absMiddle" > 转帖到开心网 </span> </a> <a href="javascript:share(2)" > <span> <img alt="转帖到人人网" src="http://s.xnimg.cn/favicon-rr.ico" align="absMiddle" > 转帖到人人网 </span> </a> <a href="javascript:share(3)" ><span><img alt="收藏到QQ书签" src="http://www.qq.com/favicon.ico" align="absMiddle" > 收藏到QQ书签</span></a> <a href="javascript:share(4)" ><span><img alt="添加到百度收藏" src="http://www.baidu.com/favicon.ico" align="absMiddle" > 添加到百度收藏</span></a> </div>
标签云
.htaccess 301 2010 Android apache cache cacti CSS date ddos discuz django fastcgi freebsd git google http iftop linux macos mysql nginx njava php pr python sed seo snmp ssh ubuntu ubuntu10.04 wordpress xdebug 优化 密码 文件 时区 用户 登录 监控 缓存 网站 脚本 颜色
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
近期文章
近期评论
文章归档
链接表
QR Code
