• qq,新浪分享


    var _title,_source,_sourceUrl,_pic,_showcount,_desc,_summary,_site;

    // 新浪微博分享
    $('.xlwb-share').on('click',function(event){
    event.preventDefault();
    $('.panle-share').hide()
    var _shareUrl = 'http://v.t.sina.com.cn/share/share.php?title="123"'; //真实的appkey,必选参数
    _shareUrl += '&url='+ encodeURIComponent(_url||document.location); //参数url设置分享的内容链接|默认当前页location,可选参数
    _shareUrl += '&title=' + encodeURIComponent(_title||document.title); //参数title设置分享的标题|默认当前页标题,可选参数
    _shareUrl += '&source=' + encodeURIComponent(_source||'');
    _shareUrl += '&sourceUrl=' + encodeURIComponent(_sourceUrl||'');
    _shareUrl += '&content=' + 'utf-8'; //参数content设置页面编码gb2312|utf-8,可选参数
    _shareUrl += '&pic=' + encodeURIComponent(_pic); //参数pic设置图片链接|默认为空,可选参数
    window.open(_shareUrl,'_blank');
    })

    // QQ空间分享
    $('.QQ-zong-share').on('click',function(event){
    event.preventDefault();
    $('.panle-share').hide()
    var _shareUrl = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?';
    _shareUrl += 'url=' + encodeURIComponent(_urls||document.location); //参数url设置分享的内容链接|默认当前页location
    _shareUrl += '&showcount=' + _showcount||0; //参数showcount是否显示分享总数,显示:'1',不显示:'0',默认不显示
    _shareUrl += '&desc=' + encodeURIComponent(_desc||'分享的描述'); //参数desc设置分享的描述,可选参数
    _shareUrl += '&summary=' + encodeURIComponent(_summary||'分享摘要'); //参数summary设置分享摘要,可选参数
    _shareUrl += '&title=' + encodeURIComponent(_title||document.title); //参数title设置分享标题,可选参数
    _shareUrl += '&site=' + encodeURIComponent(_site||''); //参数site设置分享来源,可选参数
    _shareUrl += '&pics=' + encodeURIComponent(_pic); //参数pics设置分享图片的路径,多张图片以"|"隔开,可选参数
    window.open(_shareUrl,'_blank');
    })

    // QQ好友分享
    $('.QQ-friend-share').on('click',function(event){
    event.preventDefault();
    $('.panle-share').hide()
    var _shareUrl = 'https://connect.qq.com/widget/shareqq/iframe_index.html?';
    _shareUrl += 'url=' + encodeURIComponent(_url||location.href); //分享的链接
    _shareUrl += '&title=' + encodeURIComponent(_title||document.title); //分享的标题
    _shareUrl += '&pics=' + encodeURIComponent(_pic); //参数pics设置分享图片的路径,多张图片以"|"隔开,可选参数
    window.open(_shareUrl,'_blank');
    })

  • 相关阅读:
    U盘修复
    在tomcat中配置jdk的不同版本
    集​群​t​o​m​c​a​t​+​a​p​a​c​h​e​配​置​文​档
    如何挂自己的web项目(免费拥有自己的网站及域名)
    JQuery对表格进行排序
    JQuery中对各种域进行隐藏和显示操作
    大文件批量上传断点续传文件秒传
    web 开发常用字符串表达式匹配
    spring 工具类大集合
    spring 是如何注入对象的和bean 创建过程分析
  • 原文地址:https://www.cnblogs.com/iroading/p/11493107.html
Copyright © 2020-2023  润新知