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>
以上就是本文的全部?jī)?nèi)容,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來一定的幫助,同時(shí)也希望多多支持腳本之家!
相關(guān)文章
cropper.js和exif.js實(shí)現(xiàn)頭像上傳縮放裁剪旋轉(zhuǎn)
這篇文章主要為大家詳細(xì)介紹了cropper.js和exif.js實(shí)現(xiàn)頭像上傳縮放裁剪旋轉(zhuǎn),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-02-02
javascript跨域總結(jié)之window.name實(shí)現(xiàn)的跨域數(shù)據(jù)傳輸
本文給大家介紹window.name實(shí)現(xiàn)的跨域數(shù)據(jù)傳輸,自己親自實(shí)踐了一下,真的非常好用,特此分享到腳本之家網(wǎng)站供大家參考2015-11-11
Bootstrap實(shí)現(xiàn)的表格合并單元格示例
這篇文章主要介紹了Bootstrap實(shí)現(xiàn)的表格合并單元格,涉及bootstrap界面布局相關(guān)操作技巧,需要的朋友可以參考下2018-02-02
微信小程序?qū)崿F(xiàn)的繪制table表格功能示例
這篇文章主要介紹了微信小程序?qū)崿F(xiàn)的繪制table表格功能,涉及微信小程序數(shù)據(jù)讀取及界面布局相關(guān)操作技巧,需要的朋友可以參考下2019-04-04
JS實(shí)現(xiàn)簡(jiǎn)單控制視頻播放倍速的實(shí)例代碼
這篇文章主要介紹了通過JS來實(shí)現(xiàn)簡(jiǎn)單控制視頻播放倍速,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-04-04
BetterScroll 在移動(dòng)端滾動(dòng)場(chǎng)景的應(yīng)用
BetterScroll 是一款重點(diǎn)解決移動(dòng)端各種滾動(dòng)場(chǎng)景需求的開源插件( GitHub地址 ),非常不錯(cuò),下面腳本之家小編給大家分享BetterScroll 在移動(dòng)端滾動(dòng)場(chǎng)景的應(yīng)用,一起看看吧2017-09-09
JavaScript的Number對(duì)象的toString()方法
toString()方法可以把Number對(duì)象轉(zhuǎn)換成字符串,并返回此字符串,本文給大家介紹JavaScript的Number對(duì)象的toString()方法,對(duì)javascript對(duì)象方法相關(guān)知識(shí)感興趣的朋友一起學(xué)習(xí)吧2015-12-12
javascript中select下拉框的用法總結(jié)
這篇文章主要為大家介紹了javascript中select下拉框的用法,select在開發(fā)中經(jīng)常被用到,用于進(jìn)行選項(xiàng)選擇,需要的朋友可以參考下2016-01-01

