码迷,mamicode.com
首页 > Web开发 > 详细

HTML实现百度分享插件分享网页

时间:2019-08-07 18:49:18      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:child   span   view   col   百度   creat   window   tag   one   

一、HTML代码如下:

<div class="bdsharebuttonbox">
        <a href="#" class="bds_more" data-cmd="more"></a>
        <a href="#" class="bds_qzone" data-cmd="qzone"></a>
        <a href="#" class="bds_tsina" data-cmd="tsina"></a>
        <a href="#" class="bds_tqq" data-cmd="tqq"></a>
        <a href="#" class="bds_renren" data-cmd="renren"></a>
        <a href="#" class="bds_weixin" data-cmd="weixin"></a>
    </div>

二、JavaScript代码如下:

<script>
    window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"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>

 

HTML实现百度分享插件分享网页

标签:child   span   view   col   百度   creat   window   tag   one   

原文地址:https://www.cnblogs.com/phperlinxinlan/p/11317060.html

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