微博分享代码
2012-01-11 14:36
204 查看
<!--[if IE 6]> <style type="text/css"> #fixed{display:none;} </style> <![endif]--> <div id="fixed" name="fixed" style=" position:fixed; top:330px; left:3px; "> <a href="javascript:void(0)" onclick="postToWb();" class="tmblog"> <img src="http://v.t.qq.com/share/images/s/weiboicon24.png" alt ="分享到腾讯微博" style=" border:none; margin-right:10px; " /></a> <script type="text/javascript"> function postToWb() { var _t = encodeURI(document.title); var _url = encodeURIComponent(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'); } </script> <script type="text/javascript" charset="utf-8"> (function () { var _w = 90, _h = 24; var param = { url: location.href, type: '2', count: '1', /**是否显示分享数,1显示(可选)*/ appkey: '', /**您申请的应用appkey,显示分享来源(可选)*/ title: '', /**分享的文字内容(可选,默认为所在页面的title)*/ pic: '', /**分享图片的路径(可选)*/ ralateUid: '1909664830', /**关联用户的UID,分享微博会@该用户(可选)*/ language: 'zh_cn', /**设置语言,zh_cn|zh_tw(可选)*/ rnd: new Date().valueOf() } var temp = []; for (var p in param) { temp.push(p + '=' + encodeURIComponent(param[p] || '')) } document.write('<iframe allowTransparency="true" frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&') + '" width="' + _w + '" height="' + _h + '"></iframe>') })() </script> <br /> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=80455399&site=qq&menu=yes" > <img border="0" src="http://wpa.qq.com/pa?p=2:80455399:50" alt="点击这里给我发消息" title="点击这里给我发消息" /> </a> </div>
效果图
相关文章推荐
- 分享到微博、空间、家园代码
- 各种微博分享按钮代码
- 微博分享各类规格代码
- 分享微博js代码
- 微信、qq、微博第三方分享集成封装代码
- 各种微博分享按钮代码
- python发腾讯微博代码分享
- 分享到新浪与QQ微博代码
- 分享微博@功能jquery代码及全面解析
- 分享到新浪,空间,微博等的代码
- 网页中实现"分享至微博、QQ空间等"代码
- 分享到QQ空间、微博等的代码
- [置顶] 分享微博@功能jquery代码及全面解析
- 空间 ,微信,微博等分享的代码
- 分享到微博代码
- 分享到微博的代码
- 分享到微信微博空间等第三方平台的JS代码
- 分享到微信,空间,微博,人人网代码
- 基于JQuery,博客、微博分享代码的封装。