打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
网页一键分享按钮HTML代码

在网页中加入以下代码可以实现网页的一键分享:

  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4. <META http-equiv="content-type" content="text/html; charset="UTF-8">  
  5. <title>Insert title here</title>  
  6. </head>  
  7. <body>  
  8. <div class="bdsharebuttonbox">  
  9. <a href="#" class="bds_more" data-cmd="more"></a>  
  10. <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>  
  11. <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>  
  12. <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>  
  13. <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>  
  14. <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>  
  15. </div>  
  16. <script>  
  17. window._bd_share_config={  
  18.         "common":{  
  19.             "bdPopTitle":"您的自定义pop窗口标题",  
  20.             "bdSnsKey":{},  
  21.             "bdText":"此处填写自定义的分享内容",   
  22.             "bdMini":"2",  
  23.             "bdMiniList":false,  
  24.             "bdPic":"http://localhost/centlight/public/attachment/201410/24/14/5449ef39574f5_282x220.jpg", /* 此处填写要分享图片地址 */  
  25.             "bdStyle":"0",  
  26.             "bdSize":"16"  
  27.             },  
  28.         "share":{}  
  29. };  
  30. with(document)0[  
  31.                 (getElementsByTagName(''head'')[0]||body).  
  32.                 appendChild(createElement(''script'')).  
  33.                 src=''http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=''+~(-new Date()/36e5)  
  34. ];  
  35.         </script>  
  36. </body>  
  37. </html>  
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
【网页特效】添加收藏 - 将网页添加到浏览器收藏夹里
百度分享新浪微博无法分享图片的解决方法
代码学习笔记33【页内插入样式应用】
小白搞爬虫
点开网页自动关机的代码
音画制作方法与步骤 - 悠悠红河的日志 - 网易博客
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服