$('.weibo.sns').on("touchend",function(e){ var e = e || window.event; e.stopPropagation(); var p = { appkey : '', url : window.location.href, title : document.title, pic : '', content : 'utf-8' } var s = []; for (var i in p) { s.push(i + '=' + encodeURIComponent(p[i] || '')); } window.location = "http://service.weibo.com/share/share.php?"+s.join('&'); }); $('.qq.sns').on("touchend",function(e){ var e = e || window.event; e.stopPropagation(); var p = { url : window.location.href, desc : '', title : document.title, summary : '', pic : '', site : '', } var s = []; for (var i in p) { s.push(i + '=' + encodeURIComponent(p[i] || '')); } window.location = "http://connect.qq.com/widget/shareqq/index.html?"+s.join('&'); });
转载于:https://blog.51cto.com/tomastong/1788087