function snsShare(snsId, title, content, image, url) { var snsUrl; // 新浪 腾讯 要申请appkey switch (snsId) { case 1: snsUrl = 'http://service.weibo.com/share/share.php?appkey=123456'; snsUrl += '&title='+content+'&pic='+image+'&url='+url; break; case 2: snsUrl = 'http://share.v.t.qq.com/index.php?c=share&a=index&appkey=123456&site=http://www.***.com'; snsUrl += '&title='+content+'&pic='+image+'&url='+url; break; case 3: snsUrl = 'http://widget.renren.com/dialog/share?'; snsUrl += 'title='+title+'&images='+image+'&resourceUrl='+url+'&description='+content; break; case 4: snsUrl = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?'; snsUrl += 'title='+title+'&pics='+image+'&url='+url+'&summary='+content; break; } window.open( snsUrl, null, "height = 440, width = 640, toolbar = no, menubar = no, scrollbars = no, resizable = yes, location = no, status = no" ); }