PC分享
<span class="s-logo1" onclick="tsina_a()">新浪微博</span> <span class="s-logo3" onclick="txWeibo()">腾讯微博</span> <span class="s-logo4" onclick="qqZone()">QQ空间</span>
1 //新浪分享 2 function tsina_a() { 3 var n = screen 4 , t = document 5 , i = encodeURIComponent 6 , r = "http://v.t.sina.com.cn/share/share.php?" 7 , u = t.location.href 8 , f = ["url=", i(u), "&title=", i(t.title)].join(""); 9 window.open([r, f].join(""), "mb", ["toolbar=0,status=0,resizable=1,width=620,height=450,left=", (n.width - 620) / 2, ",top=", (n.height - 450) / 2].join("")) || (u.href = [r, f].join("")) 10 } 11 12 //qq空间分享 13 function qqZone() { 14 var n = screen 15 , t = document 16 , i = encodeURIComponent 17 , r = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?" 18 , u = t.location.href 19 , f = ["url=", u, '&title=', t.title].join(""); 20 window.open([r, f].join(""), "mb", ["toolbar=0,status=0,resizable=1,width=620,height=450,left=", (n.width - 620) / 2, ",top=", (n.height - 450) / 2].join("")) || (u.href = [r, f].join("") + '&summary='); 21 } 22 23 // 腾讯微博分享 24 function txWeibo() { 25 var n = screen 26 , t = document 27 , i = encodeURIComponent 28 , r = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?" 29 , u = t.location.href 30 , f = ["url=", i(u), "&title=", i(t.title)].join(""); 31 window.open([r, f].join(""), ' ', ["toolbar=0,status=0,resizable=1,width=620,height=450,left=", (n.width - 620) / 2, ",top=", (n.height - 450) / 2].join("")) || (u.href = [r, f].join("")) 32 }