Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[DZ通用]添加到本地收藏和网摘书签代码鼠标滑过展示收缩版

[复制链接]
封一 发表于 2009-5-31 09:20:49 | 显示全部楼层 |阅读模式
插件发布
插件名称: [DZ通用]添加到本地收藏和网摘书签代码鼠标滑过展示收缩版
插件来源:
适用版本: Discuz! 7.0
语言编码: GBK简体 UTF8简体 BIG5繁体 
最后更新时间:
插件作者: 封一
插件简介: 收缩 展示版
本帖最后由 封一 于 2009-7-31 21:48 编辑

站长QQ交流群27984499










代码放在哪里随你自己,我只是给个例子,大家也可以进一步修改本代码
图片在附件里下载,上传在根目录里[没钱在请在演示地址里下载]

演示地址http://www.65bb.com/thread-9178-1-1.html
演示图片
鼠标未滑过

鼠标滑过



将以下代码加到帖内广告里

广告投放位置:帖子上方
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7. <style>
  8. body { font-size:12px}
  9. #box { background:#FFFFCC; border:1px solid #FFCC66; width:600px; height:100px;display:none; text-align:right; margin:2px; overflow:hidden}
  10. #box2 { background:#CDEDEC; border:1px solid #3399CC; width:600px; height:100px;display:none;text-align:right; margin:2px; overflow:hidden}
  11. .bt_down {background: #DDDCE4 url(/images/default/arrow_down.gif) no-repeat 35px 46%; padding:5px 20px 5px 5px; text-align:left}
  12. #my {}
  13. #my .my_ { background:#DDDCE4; width:200px; height:150px; display:none; overflow:hidden}
  14. #my .my_ ul{ list-style:none; padding:0; margin:10px 0 10px 10px; height:140px}
  15. #my .my_ ul li { width:48%; float:left; text-align:center; line-height:22px; border-bottom:1px solid #B6B6C0}
  16. #s_img { width:430px; overflow:scroll; overflow-y:hidden;overflow-x:hidden; border:1px solid #ccc}
  17. #imgs ul { list-style:none; margin-left:0; padding-left:0}
  18. #imgs ul li{ float:left; margin:3px;}
  19. </style>
  20. <script>

  21. function open_my(){
  22. var obj=document.getElementById("my_");
  23. obj.style.display="block";
  24. obj.style.width="1px";
  25. obj.style.height="1px";
  26. var changeW=function(){
  27.   var obj_w=parseInt(obj.style.width);/
  28.   var obj_h=parseInt(obj.style.height);
  29.   if(obj_w<200  &&  obj_h<200){
  30.    obj.style.width=(obj_w+Math.ceil((200-obj_w)/20))+"px";
  31.    obj.style.height=(obj_h+Math.ceil((200-obj_h)/15))+"px";
  32.   }
  33.   else{
  34.   clearInterval(bw);
  35.   }
  36. }
  37. var bw=window.setInterval(changeW,1)//每0.001秒调用一次changeW
  38. }

  39. function close_my(id){
  40. var obj=document.getElementById(id);
  41. var closeDiv=function(){
  42.   var obj_w=parseInt(obj.style.width);
  43.   var obj_h=parseInt(obj.style.height);
  44.   if(obj_w>1  &&  obj_h >1){
  45.    obj.style.width=(obj_w-Math.ceil(obj_w)/20)+"px";
  46.    obj.style.height=(obj_h-Math.ceil(obj_h)/15)+"px";
  47.   }
  48.   else{
  49.   clearInterval(bw);
  50.   obj.style.display="none";
  51.   }
  52. }
  53. var bw=window.setInterval(closeDiv,1)//每0.001秒调用一次changeW
  54. }
  55. </script>
  56. <body><div id="my">
  57. <a href="#" class="bt_down" onmouseover="open_my()">添加本页到网络书签或本地收藏夹</a>
  58.     <div class="my_" id="my_" ><ul><li><a href="javascript:d=document;window.external.AddFavorite(''+d.location.href+'', ''+d.title+'')" target="_self"><font color="#ee5500"><img src="/65bb/shuqian/fav1.jpg" width="13" height="16" border="0" />本地收藏夹</a></li><li><a href="javascript:u=location.href;t=document.title;void(open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'','toolbar=no,width=900,height=500,left=50,top=50,status=no,resizable=yes'));"><img src="/65bb/shuqian/google.gif" alt="添加到“Google书签”" border="0">Google书签</a></li><li><a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0"><img border="0" src="/65bb/shuqian/baidu.gif" alt="添加到“百度书签”">百度书签</a></li><li><a href="javascript: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,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)" ><img src="/65bb/shuqian/qq.gif" alt="添加到“QQ书签”" border="0">QQ书签</a></li><li><a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=50,top=50,status=no,resizable=yes'));vivi.focus();"><img src="/65bb/shuqian/sina.gif" alt="添加到“新浪ViVi”" border="0">新浪书签</a></li><li><a href="javascript:mywebyx=document;mywebya=encodeURIComponent(mywebyx.location.href);mywebyt=encodeURIComponent(mywebyx.title);mywebyd=encodeURIComponent(document.selection.createRange().text);open('http://myweb.cn.yahoo.com/popadd.html?src=iebookmark&url='+mywebya+'&title='+mywebyt+'&summary='+mywebyd,'Yahoo','width=780,height=455,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0);"><img src="/65bb/shuqian/yahoo.gif" alt="添加到“Yahoo收藏”" border="0">雅虎书签</a></li><li><a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','yesky','scrollbars=no,width=400,height=480,left=50,top=20,status=no,resizable=yes'));yesky.focus();"><img src="/65bb/shuqian/tianji.gif" alt="添加到“天极网摘”" border="0">天极网摘</a></li> <li><a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&img=http://www.h-strong.com/blog/logo.gif','keyit','scrollbars=no,width=475,height=575,left=50,top=50status=no,resizable=yes'));keyit.focus();"><img src="/65bb/shuqian/poco.gif" alt="添加到“POCO网摘”" border="0">POCO网摘</a></li> <li><a href="javascript:{var o=document.createElement('scri'+'pt');o.src='http://img.chouti.com/js/cooperate.js?v='+Math.random();o.id='ct_bookmark_scripts';o.type='text/javascript';o.charset='utf-8';document.body.appendChild(o);void(0);var lug='';}"><img src="/65bb/shuqian/chouti.gif" alt="添加到抽屉网摘" border="0" />抽屉网摘</a></li> <li><a href="javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=50,top=50,status=no,resizable=yes'));"><img src="/65bb/shuqian/hexun.gif" alt="添加到“和讯网摘”" border="0">和讯网摘</a></li><li><a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(wozhai=window.open('http://www.wozhai.com/wozhai/Cento.asp#t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'wozhai','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));wozhai.focus();"><img src="/65bb/shuqian/wozhai.gif" alt="添加到我摘网摘" border="0">我摘网摘</a></li>
  59. <li><a href="javascript:var d=document,w=window,f='http://fanfou.com/share',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'?t='+e(d.title)+'?d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'?s=bl';if(!w.open(f+'r'+p,'sharer','toolbar=0,status=0,width=600,height=400')){l.href=f+'.new'+p;}void(0)"><img src="/65bb/shuqian/fanfou.gif" alt="添加到饭否网摘" border="0">饭否网摘</a> </li><li><a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=600,left=50,top=50,status=no,resizable=yes'));keyit.focus();"><img src="/65bb/shuqian/365.gif" alt="添加到“365天天网摘”" border="0">365网摘</a></li><li><a href="http://www.zhuaxia.com/add_channel.php?sourceid=102&url=http://www.65bb.com"><img src="/65bb/shuqian/zhuaxia.gif" border="0" alt="添加到抓虾网摘" border="0">抓虾网摘</a></li><li><a  href="http://reader.yodao.com/b.do?url=www.65bb.com"><img src="/65bb/shuqian/youdao.gif" border="0" alt="添加有道阅读" border="0">有道网摘</a> </li><li><a href="#" onclick="close_my('my_')">关闭</a></li>
  60.         </ul>
  61.     </div>
  62. </div>
  63. <script type="text/javascript">
  64. function scror(){
  65. var obj=document.getElementById("s_img");
  66. var h=function(){
  67.   var obj_w=parseInt(obj.style.width);
  68.   if(obj.scrollLeft<obj_w){
  69.    obj.scrollLeft=(obj.scrollLeft+Math.ceil((obj_w-obj.scrollLeft)/15));
  70.   }
  71.   else{
  72.   clearInterval(bw);
  73.   }
  74. }
  75. var bw=window.setInterval(h,1)
  76. }
  77. function scrol(){
  78. var obj=document.getElementById("s_img");
  79. var h=function(){
  80.   var obj_w=parseInt(obj.style.width);
  81.   if(obj.scrollLeft>1){
  82.    obj.scrollLeft-=Math.ceil(obj_w)/50;
  83.   }
  84.   else{
  85.   clearInterval(bw);
  86.   }
  87. }
  88. var bw=window.setInterval(h,1)
  89. //obj.scrollLeft-=parseInt(obj.style.width);
  90. }
  91. </script>
  92. </body>
  93. </html>
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
jxhjjm 发表于 2009-5-31 10:09:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

402099300 发表于 2009-5-31 10:14:21 | 显示全部楼层
呵呵,我的也用上了


--------------------
www.52sr.net
我爱上饶
回复

使用道具 举报

402099300 发表于 2009-5-31 10:14:59 | 显示全部楼层
感觉太多了!!!能不能少点?
回复

使用道具 举报

402099300 发表于 2009-5-31 10:16:59 | 显示全部楼层
能不能添加到,个人用户信息下面啊?
回复

使用道具 举报

空间11a 发表于 2009-5-31 10:59:00 | 显示全部楼层
楼主真是太历害了~~! 佩服 !~
回复

使用道具 举报

liktmart 发表于 2009-5-31 12:46:54 | 显示全部楼层
非常不错,找这玩意儿找了老久了。谢谢
回复

使用道具 举报

64243354 发表于 2009-5-31 13:38:35 | 显示全部楼层
收藏了.....
有空再裝~
回复

使用道具 举报

ZHDI85312345 发表于 2009-5-31 17:20:28 | 显示全部楼层
opera浏览器不会自动收缩
回复

使用道具 举报

zqxsport 发表于 2009-5-31 17:41:40 | 显示全部楼层
感觉太多了!!!能不能少点?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-15 10:36 , Processed in 0.032084 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表