zoukankan      html  css  js  c++  java
  • 在同一个页面上要使用多个百度分享,控件人分享的内容信息

    在同一个页面上要使用多个百度分享,控件人分享的内容信息,

      需要在分享前做一个小操作。

    "onBeforeClick":function(cmd,config){
      return {
      "bdUrl": $("#shareContent_url").val(),
      "bdText": $("#shareContent_text").val(),
      "bdDesc":$("#shareContent_desc").val(),
      "bdPic":$("#shareContent_pic").val()

     }

    window._bd_share_config = {
    "common":{
    "bdSnsKey":{},
    "bdUrl":"要分享的URL",
    "bdText":"显示的标题",
    "bdDesc":"显示的描述文字",
    "bdMini":"2",
    "bdMiniList":false,
    "bdStyle":"0",
    "bdSize":"16",
    "onBeforeClick":function(cmd,config){
    return {
    "bdUrl": $("#shareContent_url").val(),
    "bdText": $("#shareContent_text").val(),
    "bdDesc":$("#shareContent_desc").val(),
    "bdPic":$("#shareContent_pic").val()
    }
    }
    },
    "share":{"bdSize":16},
    "image":{
    "viewList":["qzone","tsina","tqq","weixin","sqq"],
    "viewText":"More",
    "viewSize":"16"
    },
    "selectShare":{
    "bdContainerClass":"link-a",
    "bdSelectMiniList":["qzone","tsina","tqq","weixin"]
    }
    };
    with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

    这样,这个问题就可以解决了,文本框中就是我当前要分享的内容,当然,一次只对一条信息进行分享。 

  • 相关阅读:
    HDU-6315 Naive Operations 线段树
    18牛客第二场 J farm
    POJ
    SPOJ
    codeforces 501C. Misha and Forest
    Codeforces 584C
    Domination
    HDU-3074 Multiply game
    Codefoeces-689D Friends and Subsequences
    Codeforces Round #486 (Div. 3)
  • 原文地址:https://www.cnblogs.com/yifenghong/p/3796243.html
Copyright © 2011-2022 走看看