又看到一种新的日志转贴方法
2010-11-12 14:43
232 查看
昨天发了一篇关于日志转贴方法的设置,但是对于不会html的朋友来说实现是有点难度了。呵呵,今天继续研究,看到别一个网站提供了一系列的日志转贴方法。研究了哈,呵呵,可以拿过来使用。方法如下,将下述,这段代码直接复制,一会儿也要粘贴的。
然后,复制到后台,一个设置的选项,
粘贴在这个框中,然后提交修改,就是点击保存。
现在的事件就简单了,
<a class="renren sina" title="新浪" onclick="share_to('tsina');return false;" href="javascript:void(0);">新浪</a>
这行,就会出现新浪,
其他的类似了。看如下
<a href="javascript:void(0);" title="人人网" onclick="share_to('renren');return false;" class="renren"></a>
<a href="javascript:void(0);" title="开心网" onclick="share_to('kaixin001');return false;" class="renren kaixin"></a>
<a href="javascript:void(0);" title="搜狐" onclick="share_to('tsohu');return false;" class="renren sohu"></a>
<a href="javascript:void(0);" title="腾讯空间" onclick="share_to('qq');return false;" class="renren qqzone"></a>
<a href="javascript:void(0);" title="腾讯微博" onclick="share_to('qqwb');return false;" class="renren qqzonewb"></a>
<a href="javascript:void(0);" id="copyContent" onclick="copyTitleAndUrl();" class="copy">复制链接地址</a>
<script type="text/javascript"> <!-- function share_to(m) { if (m == "qq") { window .open( 'http://shuqian.qq.com/post?from=3&title=' + encodeURIComponent(document.title) + '&uri=' + encodeURIComponent(document.location.href) + '&jumpback=2&noui=1', 'favit', 'width=930,height=470,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes,left=' + (screen.width - 930) / 2 + ',top=' + (screen.height - 470) / 2); } else if (m == "tsina") { void ((function(s, d, e) { try { } catch (e) { } var f = 'http://v.t.sina.com.cn/share/share.php?', u = d.location.href, p = [ 'url=', e(u), '&title=', e(d.title), '&appkey=330242870'] .join(''); function a() { if (!window .open( [f, p].join(''), 'mb', [ 'toolbar=0,status=0,resizable=1,width=620,height=450,left=', (s.width - 620) / 2, ',top=', (s.height - 450) / 2].join(''))) u.href = [f, p].join(''); } ; if (/Firefox/.test(navigator.userAgent)) { setTimeout(a, 0) } else { a() } })(screen, document, encodeURIComponent)); } else if (m == "douban") { void (function() { var d = document, e = encodeURIComponent, s1 = window.getSelection, s2 = d.getSelection, s3 = d.selection, s = s1 ? s1() : s2 ? s2() : s3 ? s3.createRange().text : '', r = 'http://www.douban.com/recommend/?url=' + e(d.location.href) + '&title=' + e(d.title) + '&sel=' + e(s) + '&v=1', x = function() { if (!window .open(r, 'douban', 'toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=355,left=' + (screen.width - 450) / 2 + ',top=' + (screen.height - 330) / 2)) location.href = r + '&r=1' }; if (/Firefox/.test(navigator.userAgent)) { setTimeout(x, 0) } else { x() } })(); } else if (m == "renren") { void ((function(s, d, e) { if (/renren\.com/.test(d.location)) return; var f = 'http://share.renren.com/share/buttonshare.do?link=', u = d.location, l = d.title, p = [ e(u), '&title=', e(l)].join(''); function a() { if (!window .open( [f, p].join(''), 'xnshare', [ 'toolbar=0,status=0,resizable=1,width=626,height=436,left=', (s.width - 626) / 2, ',top=', (s.height - 436) / 2].join(''))) u.href = [f, p].join(''); } ; if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a(); })(screen, document, encodeURIComponent)); } else if (m == "tsohu") { void ((function(s, d, e) { var f = 'http://t.sohu.com/third/post.jsp?link=', u = d.location; function a() { if (!window .open( [f, e(u)].join(''), 'tsohu', [ 'toolbar=0,status=0,resizable=1,width=660,height=470,left=', (s.width - 660) / 2, ',top=', (s.height - 470) / 2].join(''))) u.href = [f, e(u)].join(''); } ; if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a(); })(screen, document, encodeURIComponent)); } else if (m == "kaixin001") { var kw = window .open( '', 'kaixin001', 'toolbar=no,titlebar=no,status=no,menubar=no,scrollbars=no,location:no,directories:no,width=570,height=350,left=' + (screen.width - 570) / 2 + ',top=' + (screen.height - 420) / 2); var tempForm = kw.document.createElement('form'); function openPostWindow(url, data, name) { var tempForm = document.createElement('form'); tempForm.id = 'tempForm1'; tempForm.method = 'post'; tempForm.action = url; tempForm.target = 'kaixin001'; var hideInput = document.createElement('input'); hideInput.type = 'hidden'; hideInput.name = 'rcontent'; hideInput.value = data; tempForm.appendChild(hideInput); document.body.appendChild(tempForm); tempForm.submit(); document.body.removeChild(tempForm); } function add2Kaixin001() { var u = document.location.href; var t = document.title; var c = '' + (document.getSelection ? document.getSelection() : document.selection.createRange().text); var iframec = ''; var url = kaixin_url ; var data = encodeURIComponent(c); openPostWindow(url, c, '_blank') } add2Kaixin001(); } else if (m == "qqwb") { var _t = encodeURIComponent(document.title); var _url = encodeURIComponent(document.location.href); var _appkey = encodeURI("4b044984590e4efe977521cd69fe25ca"); //你从腾讯获得的appkey var _pic = encodeURI(''); //(例如:var _pic='图片url1|图片url2|图片url3....) var _site = 'http://www.yintai.com'; //你的网站地址 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>
然后,复制到后台,一个设置的选项,
粘贴在这个框中,然后提交修改,就是点击保存。
现在的事件就简单了,
<a class="renren sina" title="新浪" onclick="share_to('tsina');return false;" href="javascript:void(0);">新浪</a>
这行,就会出现新浪,
其他的类似了。看如下
<a href="javascript:void(0);" title="人人网" onclick="share_to('renren');return false;" class="renren"></a>
<a href="javascript:void(0);" title="开心网" onclick="share_to('kaixin001');return false;" class="renren kaixin"></a>
<a href="javascript:void(0);" title="搜狐" onclick="share_to('tsohu');return false;" class="renren sohu"></a>
<a href="javascript:void(0);" title="腾讯空间" onclick="share_to('qq');return false;" class="renren qqzone"></a>
<a href="javascript:void(0);" title="腾讯微博" onclick="share_to('qqwb');return false;" class="renren qqzonewb"></a>
<a href="javascript:void(0);" id="copyContent" onclick="copyTitleAndUrl();" class="copy">复制链接地址</a>
相关文章推荐
- Oracle 日志的编写与查询的一种方法(还没写完)
- 一种为使用Log4j的分布式应用提供云端日志服务的方法
- 一种线上服务日志切分与压缩方法
- 一种基于自定义代码记录用户访问日志在Sharepoint网站的应用方法!
- 一种日志采集装置和日志采集方法
- 一种基于自定义代码记录用户访问日志在Sharepoint网站的应用方法!
- SQL安装时出错,提示:安装程序配置服务器失败 参考服务器错误日志。针对其中一种情况的解决方法!
- 一种日志切割工具的配置方法
- log4cpp的RollingFileAppender异常情况下日志文件不拆分的一种可能解决方法
- 在上JAVA课时看到了一种的调试方法,帮我把这个循环弄明白了,而且对FOR循环的理解也更深了
- 工作日志记录:关于脉脉这款应用的默认用户头像的一种实现方法
- 一种服务器日志管理方法及系统
- [转贴]Sql Server实用操作-无数据库日志文件恢复数据库两种方法
- 一种系统日志的处理方法、装置和系统
- 一种用户操作日志信息的记录及读取方法
- 一种制作微秒级精度定时器的方法(转贴)
- 一种基于实时日志的网站威胁检测的方法及系统
- 一种网站错误页日志记录方法
- 一种网络用户行为日志自动获取方法
- 一种制作微秒级精度定时器的方法(转贴)