百度分享按鈕提供自定義評論功能,該功能目前支持自定義qq空間,開心網和人人網的評論內容,設置如下:
1、通過全局配置進行修改:
<!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" data="{'comment':'目前支持自定義qq空間,開心網和人人網的評論內容'}"> <a class="bds_qzone">QQ </a> <a class="bds_tsina">新浪</a> <a class="bds_tqq">騰訊</a> <a class="bds_renren">人人</a> <span class="bds_more">更多</span> </div> <script type="text/javascript" id="bdshare_js" data="type=slide&mini=1" ></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> <!-- Baidu Button END -->
2、通過增加按鈕html標簽的data屬性進行修改:
<!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" data="type=tools"> <a class="bds_qzone">QQ </a> <a class="bds_tsina">新浪</a> <a class="bds_tqq">騰訊</a> <a class="bds_renren">人人</a> <span class="bds_more">更多</span> </div> <script type="text/javascript" id="bdshare_js" data="type=slide&mini=1" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> //在這里定義bds_config var bds_config = {'bdComment':'目前支持自定義qq空間,開心網的評論內容'}; document.getElementById('bdshell_js').src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000); </script> <!-- Baidu Button END -->
更多建議: