QQ空间分享代码如下:
http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ空间">
新浪微博分享代码如下:
http://hits.sinajs.cn/A1/weiboshare.html?url=%url%&appkey=&type=3" width="16" height="16">'.replace(/%url%/,encodeURIComponent(location.href)));
腾讯微博分享代码如下:
function postToWb(){
var _t = encodeURI(document.title);
var _url = encodeURI(document.location);
var _appkey = encodeURI("appkey");//你从腾讯获得的appkey
var _pic = encodeURI('');//(列如:var _pic='图片url1|图片url2|图片url3....)
var _site = '';//你的网站地址
var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
window.open( _u,'转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
}
QQ朋友社区分享代码如下:
这里发个自己DIY的分享代码,喜欢的可以拿去用,预览图如下
图片素材在压缩包里,代码内容如下,保存为js文件即可,压缩包里也有现成的。
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("
document.writeln("var _t = encodeURI(document.title);");
document.writeln("var _url = encodeURI(document.location);");
document.writeln("var _appkey = encodeURI(\"appkey\");\/\/你从腾讯获得的appkey");
document.writeln("var _pic = encodeURI(\'\');\/\/(列如:var _pic=\'图片url1|图片url2|图片url3....)");
document.writeln("var _site = \'\';\/\/你的网站地址");
document.writeln("var _u = \'http:\/\/v.t.qq.com\/share\/share.php?title=\'+_t+\'&url=\'+_url+\'&appkey=\'+_appkey+\'&site=\'+_site+\'&pic=\'+_pic;");
document.writeln("window.open( _u,\'转播到腾讯微博\', \'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no\' );}<\/script>");
document.writeln("<\/a>");