日期:2014-05-16  浏览次数:20343 次

JS实现在文章内加入百度分享

//分享按钮
document.writeln("<div class=\"share\">");
document.writeln("<div class=\"share_zi\">分享到:<\/div>");
// 引入百度分享开始
document.writeln("<div id=\"bdshare\" class=\"bdshare_t bds_tools get-codes-bdshare\">");
document.writeln("<a class=\"bds_baidu\">百度搜藏<\/a>");
document.writeln("<a class=\"bds_tsina\">新浪微博<\/a>");
document.writeln("<a class=\"bds_tqq\">腾讯微博<\/a>");
document.writeln("<a class=\"bds_kaixin001\">开心网<\/a>");
document.writeln("<a class=\"bds_renren\">人人网<\/a>");
document.writeln("<a class=\"bds_tieba\">百度贴吧<\/a>");
document.writeln("<a class=\"bds_qzone\">QQ空间<\/a>");
document.writeln("<span class=\"bds_more\">更多<\/span>");
document.writeln("<\/div>");// 去掉分享次数<a class=\"shareCount\"><\/a>
document.writeln("<script type=\"text\/javascript\" id=\"bdshare_js\" data=\"type=tools&amp;uid=37700\" ><\/script>");
document.writeln("<script type=\"text\/javascript\" id=\"bdshell_js\"><\/script>");
document.writeln("<script type=\"text\/javascript\">document.getElementById(\"bdshell_js\").src = \"http:\/\/bdimg.share.baidu.com\/static\/js\/shell_v2.js?t=\" + new Date().getHours();<\/script>")
// 引入百度分享结束
document.writeln("??<\/div>");
document.writeln("??<div style=\"height:15px;font-size:1px\"><\/div>")
//免费与声明