不知道什么时候开始,百度分享官网挂了,导致后来使用主题的客户无法使用百度分享,今天把自用的代码分享出来,需要的自取:
格式版本:

<div class="bdsharebuttonbox"> <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a> <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a> <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a> <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a> <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a> <a href="#" class="bds_more" data-cmd="more"></a></div><script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "1", "bdSize": "24" }, "share": {} }; 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>
压缩版本:

<div class="bdsharebuttonbox"><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_more" data-cmd="more"></a></div><script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};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>
如果网站开启了HTTPS,按照教程操作,把网址换成自己的就可以了,例如:“https://域名网址/static/api/js/share.js”(眼睛睁大点,看好是HTTPS,如果无效请检查js是否存在,JS文件在下面的教程里,自己下载。)
如果网站未开启HTTPS则直接复制代码放在对应的位置上即可!
版权声明:本站文章如没有特殊说明,均采集网上收集,若要转载请务必注明出处,尊重他人劳动成果共创和谐网络环境。 声明:某些文章来源于网络,所采集的到信息本站只为传递信息和分享,不做任何双方证明,也不承担任何法律责任。 文章内容若侵犯你的权益,请联系本站客服删除!
- 相关链接:
- 文章标题:
DIVCSS 第五章 CSS 区块、浮动、定位、溢出、滚动条
https://www.ezgcms.com/stuyd/669.html
相关网站教程:
- zblogPHP调用文章总数、置顶数、tag总数等相关教程说明
- 网站提示no input file specified 三种解决方法
- SSL(https)数字证书配置 Tomcat 教程
- MySQL数据库InnoDB转换为MyISAM图文教程
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PDO出现“could not find driver”解决办法
- notepad++如何关联到右键菜单并添加默认
- 阿里云CDN启用防盗链访问站点出现403教程
- Apache, IIS,Tomcat,Nginx设置http跳转到https方法
- DIVCSS 第二章 CSS文字与文本【学习吧】
- border-top: 1px dashed #ccc是什么意思-CSS属性介绍
- SSL(https)数字证书配置 Nginx 教程
- 学习吧富贵鱼CMS博客清晰响应式风格功能说明
- 重塑一下学习网一直一来修改过的哪些功能日记
- DIVCSS 第三章 CSS背景与列表