码迷,mamicode.com
首页 > 其他好文 > 详细

使用百度分享实现分享博客内容(分享内容动态)

时间:2015-04-07 09:42:48      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:


又不懂的地方可以参考百度分享官网

<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a></div>


<script> 
 $("#title").change(function(){
window._bd_share_config.share.bdText=$("#title").val();
alert( window._bd_share_config.share.bdText); 
}); 


window._bd_share_config={"common":{"bdSnsKey":{},"bdText":$("#title").val()+"--自由畅想","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16},"image":{"viewList":["weixin","tsina","qzone","tqq","renren"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["weixin","tsina","qzone","tqq","renren"]}};with(document)0[(getElementsByTagName(‘head‘)[0]||body).appendChild(createElement(‘script‘)).src=‘http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=‘+~(-new Date()/36e5)];
</script>

其中title是博文标题作为动态分享内容一部分


使用百度分享实现分享博客内容(分享内容动态)

标签:

原文地址:http://blog.csdn.net/wangdianyong/article/details/44916257

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!