百度分享js代码

来源:互联网 时间:1970-01-01

转自:http://www.internetke.com/effects/run/2013/1108/117.html


<span style="font-size:24px;"><!-- Baidu Button BEGIN --><div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"><a class="bds_qzone"></a><a class="bds_tsina"></a><a class="bds_tqq"></a><a class="bds_renren"></a><a class="bds_t163"></a><span class="bds_more">更多</span><a class="shareCount"></a></div><script type="text/javascript" id="bdshare_js" data="type=tools&uid=6478904" ></script><script type="text/javascript" id="bdshell_js"></script><script type="text/javascript">document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)</script><!-- Baidu Button END --></span>


特效说明:
百度分享js代码:复制并粘贴文本框中的JS代码,放到您的网页,可以在<body>和</body>的之间网页的任意位置放置。如果您的网站使用的模板,您也可以复制代码到您的模板,按钮将在所有网页自动出现。(兼容测试:IE6及以上、Firefox、Chrome、Opera、Safari、360等主流浏览器)


-------------------------------------------------------------------------------------------------------------------


百度官方分享插件教程:http://share.baidu.com/code

悬浮在页面右侧的例子,只需把下面代码复制即可:

<script> window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "slide": { "type": "slide", "bdImg": "1", "bdPos": "right", "bdTop": "151.5" }, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "分享到:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren", "weixin"] } }; 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>




相关阅读:
Top