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

百度分享小插件功能

时间:2019-09-24 21:23:29      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:ntb   list   spl   sel   ext   weixin   event   more   onclick   

技术图片
<html>
<head></head>
<body>

<div></div>
<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>
  <span class="bds_more">更多</span>
</div>
<div></div>
<script type="text/javascript" id="bdshare_js" data="type=tools" ></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>
</body>
</html>
View Code

第一种方法:

技术图片

技术图片

第二种方法:

技术图片
<html>
    <head>
    </head>
    <body>
        <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>
<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>
    </body>
    
</html>
View Code

技术图片

 

百度分享小插件功能

标签:ntb   list   spl   sel   ext   weixin   event   more   onclick   

原文地址:https://www.cnblogs.com/mahmud/p/11580916.html

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