最简单的社交分享代码,无需注册OpenID

包含新浪微博、QQ空间、人人网一键分享,无需注册各个开放平台的OpenID,简单易用。

//分享
function share() {
    var shareLink = location.href;
    var shareTitle = "携程2014校园大使火热招募中,机智的小伙伴们快来赚旅行基金,免费游世界啦!结伴玩耍,实践锻炼,从此快人一步! 高能预警,一大波大使专属特价旅游正在赶来的路上,详情请戳链接>>> ";

    $(".sina").click(function () {
        window.open(
            "http://v.t.sina.com.cn/share/share.php?title=" + encodeURIComponent(shareTitle) + "&url=" + encodeURIComponent(shareLink)
        );
    });

    $(".qzone").click(function () {
        window.open(
            "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + encodeURIComponent(shareLink) + "&title=" + encodeURIComponent(shareTitle) + "&site=www.ctrip.com"
        );
    });

    $(".renren").click(function () {
        window.open(
            "http://share.renren.com/share/buttonshare?link=" + encodeURIComponent(shareLink) + "&summary=" + encodeURIComponent(shareTitle)
        );
    });
}

你可能感兴趣的:(open)