<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
var Share ={
//新浪微博
sinaWeiBo:function(title,url,pic){
var _w = 72 , _h = 16;
var param = {
url:url,
type:‘3‘,
count:‘1‘, /**是否显示分享数,1显示(可选)*/
appkey:‘‘, /**您申请的应用appkey,显示分享来源(可选)*/
title:title, /**分享的文字内容(可选,默认为所在页面的title)*/
pic:pic, /**分享图片的路径(可选)*/
ralateUid:‘‘, /**关联用户的UID,分享微博会@该用户(可选)*/
rnd:new Date().valueOf()
}
var temp = [];
for( var p in param ){
temp.push(p + ‘=‘ + encodeURIComponent( param[p] || ‘‘ ) )
}
var target_url = "http://service.weibo.com/share/share.php?"+temp.join(‘&‘);
window.open(target_url,‘sinaweibo‘,‘height=430, width=400‘);
},
//qq微博
qqWeiBo:function(title,url,pic){
var _t = encodeURI(title);
var _url = encodeURIComponent(url);
var _appkey = encodeURI(‘appkey‘);//你从腾讯获得的appkey
var _pic = encodeURI(pic);//(例如:var _pic=‘图片url1|图片url2|图片url3....)
var _site = ‘http://rt.xoyo.com‘;//你的网站地址
var _u = ‘http://v.t.qq.com/share/share.php?url=‘+_url+‘&appkey=‘+_appkey+‘&site=‘+_site+‘&pic=‘+_pic+‘&title=‘+_t;
window.open( _u,‘‘, ‘width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no‘ );
},
//qq空间
qqZone:function(title,url,pic){
var p = {
url:url,
showcount:‘0‘,/*是否显示分享总数,显示:‘1‘,不显示:‘0‘ */
desc:‘‘,/*默认分享理由(可选)*/
summary:‘‘,/*分享摘要(可选)*/
title:title,/*分享标题(可选)*/
site:‘‘,/*分享来源 如:腾讯网(可选)*/
pics:pic, /*分享图片的路径(可选)*/
style:‘203‘,
width:22,
height:22
};
var s = [];
for(var i in p){
s.push(i + ‘=‘ + encodeURIComponent(p[i]||‘‘));
}
var shareURL = ‘http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?‘+s.join(‘&‘);
window.open(shareURL,‘newwindow‘,‘height=400,width=400,top=100,left=100‘);
},
//微信
weiXin:function(){
}
};
</script>
<a href="javascript:void(0)" onClick="Share.sinaWeiBo(‘我正在参加“RT热血战队”诚聘FPS游戏地图设计师活动,地址‘,‘http://my.oschina.net/yonghan/admin/new-blog‘,‘http://www.yn.xinhuanet.com/ent/2006-11/10/xin_351103101047078339115.jpg‘);" title="分享到新浪微博">一键转发新浪微博</a>
<a href="javascript:void(0)" onClick="Share.qqWeiBo(‘我正在参加“RT热血战队”诚聘FPS游戏地图设计师活动,地址‘,‘http://my.oschina.net/yonghan/admin/new-blog‘,‘http://www.yn.xinhuanet.com/ent/2006-11/10/xin_351103101047078339115.jpg‘);" class="tmblog q" title="分享到腾讯微博">一键转发腾讯微博</a>
<a href="javascript:void(0)" onClick="Share.qqZone(‘我正在参加“RT热血战队”诚聘FPS游戏地图设计师活动,地址‘,‘http://my.oschina.net/yonghan/admin/new-blog‘,‘http://www.yn.xinhuanet.com/ent/2006-11/10/xin_351103101047078339115.jpg‘);" class="tmblog q" title="分享到腾讯微博">一键转发QQ空间</a>
</body>
</html>
分享到新浪微博,qq微博,qq空间,微信