zoukankan      html  css  js  c++  java
  • 分享到QQ空间、新浪微博、腾讯微博和人人网

    function shareys(type, url, title, img, content)
    {

    switch (type) {
    case "sina":
    url = "http://service.weibo.com/share/share.php?title=" + encodeURIComponent(content + '「' + title + '」' + ' 点这里' + url) + '&pic=' + img;
    window.open(url);
    break;
    case "tqq":
    url = "http://v.t.qq.com/share/share.php?url=" + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&pic=' + img;
    window.open(url);
    break;
    case "qzone":
    url = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(url + '#-39yst-1-001') + '&title=' + encodeURIComponent(title) + '&site=&pics=' + encodeURIComponent(img) + '&desc=' + encodeURIComponent(content) +'&summary=' + encodeURIComponent(content);

    window.open(url);
    break;
    case "ren":
    url = 'http://widget.renren.com/dialog/share?resourceUrl=' + encodeURIComponent(url) + '&srcUrl=' + img + '&title=' + encodeURIComponent(title);
    +'&description=' + content;
    window.open(url);
    break;
    default:
    break;
    }
    }

    <script type="text/javascript">
    function postsShare(pType)
    {
    var pTitle = "{:$seo_title:}";
    var pImage = "";
    var pContent = "{:$seo_desc:}";
    var pUrl = window.location.href;
    shareys(pType, pUrl, pTitle, "", pContent);
    }
    </script>

  • 相关阅读:
    数据库练习
    pymysql
    数据库索引
    数据库查询
    数据库操作
    数据库建表
    数据库初识
    shell 编程
    Struts2与SpringMVC
    SpringAOP
  • 原文地址:https://www.cnblogs.com/hejianrong/p/5736487.html
Copyright © 2011-2022 走看看