js 調(diào)用百度分享功能
更新時間:2017年02月27日 15:20:21 作者:我本善良
本文主要介紹了js調(diào)用百度分享功能的方法,具有很好的參考價值,下面跟著小編一起來看下吧
效果圖:
圖(1)未展開
圖(2)展開效果
代碼如下:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <div class="bdsharebuttonbox"> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_more" data-cmd="more"></a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_qzone" data-cmd="qzone" title="分享到QQ空間"></a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_tqq" data-cmd="tqq" title="分享到騰訊微博"></a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_renren" data-cmd="renren" title="分享到人人網(wǎng)"></a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a> </div> <script> window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "32" }, "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>
以上就是本文的全部內(nèi)容,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,同時也希望多多支持腳本之家!
相關(guān)文章
JS按位非(~)運(yùn)算符與~~運(yùn)算符的理解分析
按位非運(yùn)算符,簡單的理解就是改變運(yùn)算數(shù)的符號并減去1,當(dāng)然,這是只是簡單的理解能轉(zhuǎn)換成number類型的數(shù)據(jù)2011-07-07JavaScript ( (__ = !$ + $)[+$] + ({} + $)[_/_] +({} + $)[_/_
今天在網(wǎng)上看到一篇很有意思的文章(需翻墻),解釋了幾段非常有趣的 JavaScript 代碼。你猜下面這段 JavaScript 代碼是什么意思?2011-02-02javascript 動態(tài)創(chuàng)建表格的2種方法總結(jié)
本文給大家總結(jié)了2種使用javascript動態(tài)創(chuàng)建表格的方法,非常簡單實用,小伙伴們自己對比下看看哪種更適合你呢,一般本人是使用第一種的。2015-03-03