Use of Baidu sharing button in projects, Baidu sharing button Project
The Baidu sharing button is used in the project. The main implementation code is as follows:
<Script>
Window. _ bd_share_config = {
"Common ":{
"BdText": 'Have a gift! ',
"BdDesc ":'',
"BdUrl": 'http: // www.baidu.com ', # enter the sharing address here.
"BdSign": 'off'
},
"Image ":{
"ViewList": ["qzone", "tsina", "tqq", "renren", "weixin"],
"ViewText": "share :",
"ViewSize": "16"
}
};
With (document) 0 [(getElementsByTagName ('head') [0] | body). appendChild (createElement ('script'). src = 'HTTP: // response? V = 89860593.js? Cdnversion = '+ ~ (-New Date ()/36e5)];
</Script>
All parameters and usage of Baidu share button:
<Div class = "bdsharebuttonbox" data-tag = "0000_1">
<A class = "bds_mshare" data-cmd = "mshare"> </a>
<A class = "bds_qzone" data-cmd = "qzone" href = "#"> </a>
<A class = "bds_tsina" data-cmd = "tsina"> </a>
<A class = "bds_baidu" data-cmd = "baidu"> </a>
<A class = "bds_renren" data-cmd = "renren"> </a>
<A class = "bds_tqq" data-cmd = "tqq"> </a>
<A class = "bds_more" data-cmd = "more"> more </a>
<A class = "bds_count" data-cmd = "count"> </a>
</Div>
<Script>
Window. _ bd_share_config = {
Common: {// general settings
BdText: 'custom shared content ',
BdDesc: 'custom sharing summary ',
BdUrl: 'custom sharing url address ',
BdPic: 'custom Image Sharing'
},
Share: [{# Here is the setting for placing the share button
"BdSize": 16
}],
Slide: [{# Place the floating window sharing settings here
BdImg: 0,
BdPos: "right ",
BdTop: 100
}],
Image: [{# set image sharing here
ViewType: 'LIST ',
ViewPos: 'top ',
ViewColor: 'black ',
ViewSize: '16 ',
ViewList: ['qzone ', 'tsina', 'huabany', 'qq', 'renrenren']
}],
SelectShare: [{# Place the word sharing settings here
"BdselectMiniList": ['qzone ', 'qq', 'kaixin001', 'bdxc', 'tqf']
}]
}
# Js load part. The code is fixed and cannot be changed at will.
With (document) 0 [(getElementsByTagName ('head') [0] | body). appendChild (createElement ('script'). src = 'HTTP: // response? Cdnversion = '+ ~ (-New Date ()/36e5)];
</Script>
Detailed explanation see: http://share.baidu.com/code/advance inside detailed tutorial