Html
    Css
    Js
1
<img src="http://share.baidu.com/static/web/img/imagesharepreview.jpg" data-tag="imgshare_1">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//http://share.baidu.com/code/advance#config-common
window._bd_share_config = {
common: {
bdText: 'bdText',
bdDesc: 'bdDesc',
bdComment: 'bdComment',
bdUrl: 'http://www.baidu.com/',
bdPic: 'http://share.baidu.com/static/base/img/logo.gif'
},
selectShare: {
bdSelectMiniList: ['tqq', 'tsina', 'qzone', 'sqq', 'tqf', 'kaixin001', 'renren', 'copy'],
},
image: { //imageshare, 使
tag: 'imgshare_1',
viewPos: 'top', //top|bottom
viewList: ['tqq', 'tsina', 'qzone', 'sqq', 'tqf', 'kaixin001', 'renren', 'copy'],
viewSize: 16 //16|24|32
//viewColor : 'black', // white|black
//viewType : 'list', // list|collection
}
}
with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=' + ~(-new Date() / 36e5)];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

百度图片分享

主要是data-tag="imgshare_1"与image里面的tag : 'imgshare_1',名称对应就可以了

0