本帖最后由 封一 于 2009-7-31 21:48 编辑
站长QQ交流群27984499
代码放在哪里随你自己,我只是给个例子,大家也可以进一步修改本代码
图片在附件里下载,上传在根目录里[没钱在请在演示地址里下载]
演示地址http://www.65bb.com/thread-9178-1-1.html
演示图片
鼠标未滑过
鼠标滑过
将以下代码加到帖内广告里
广告投放位置:帖子上方- <!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">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <style>
- body { font-size:12px}
- #box { background:#FFFFCC; border:1px solid #FFCC66; width:600px; height:100px;display:none; text-align:right; margin:2px; overflow:hidden}
- #box2 { background:#CDEDEC; border:1px solid #3399CC; width:600px; height:100px;display:none;text-align:right; margin:2px; overflow:hidden}
- .bt_down {background: #DDDCE4 url(/images/default/arrow_down.gif) no-repeat 35px 46%; padding:5px 20px 5px 5px; text-align:left}
- #my {}
- #my .my_ { background:#DDDCE4; width:200px; height:150px; display:none; overflow:hidden}
- #my .my_ ul{ list-style:none; padding:0; margin:10px 0 10px 10px; height:140px}
- #my .my_ ul li { width:48%; float:left; text-align:center; line-height:22px; border-bottom:1px solid #B6B6C0}
- #s_img { width:430px; overflow:scroll; overflow-y:hidden;overflow-x:hidden; border:1px solid #ccc}
- #imgs ul { list-style:none; margin-left:0; padding-left:0}
- #imgs ul li{ float:left; margin:3px;}
- </style>
- <script>
- function open_my(){
- var obj=document.getElementById("my_");
- obj.style.display="block";
- obj.style.width="1px";
- obj.style.height="1px";
- var changeW=function(){
- var obj_w=parseInt(obj.style.width);/
- var obj_h=parseInt(obj.style.height);
- if(obj_w<200 && obj_h<200){
- obj.style.width=(obj_w+Math.ceil((200-obj_w)/20))+"px";
- obj.style.height=(obj_h+Math.ceil((200-obj_h)/15))+"px";
- }
- else{
- clearInterval(bw);
- }
- }
- var bw=window.setInterval(changeW,1)//每0.001秒调用一次changeW
- }
- function close_my(id){
- var obj=document.getElementById(id);
- var closeDiv=function(){
- var obj_w=parseInt(obj.style.width);
- var obj_h=parseInt(obj.style.height);
- if(obj_w>1 && obj_h >1){
- obj.style.width=(obj_w-Math.ceil(obj_w)/20)+"px";
- obj.style.height=(obj_h-Math.ceil(obj_h)/15)+"px";
- }
- else{
- clearInterval(bw);
- obj.style.display="none";
- }
- }
- var bw=window.setInterval(closeDiv,1)//每0.001秒调用一次changeW
- }
- </script>
- <body><div id="my">
- <a href="#" class="bt_down" onmouseover="open_my()">添加本页到网络书签或本地收藏夹</a>
- <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>
- <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>
- </ul>
- </div>
- </div>
- <script type="text/javascript">
- function scror(){
- var obj=document.getElementById("s_img");
- var h=function(){
- var obj_w=parseInt(obj.style.width);
- if(obj.scrollLeft<obj_w){
- obj.scrollLeft=(obj.scrollLeft+Math.ceil((obj_w-obj.scrollLeft)/15));
- }
- else{
- clearInterval(bw);
- }
- }
- var bw=window.setInterval(h,1)
- }
- function scrol(){
- var obj=document.getElementById("s_img");
- var h=function(){
- var obj_w=parseInt(obj.style.width);
- if(obj.scrollLeft>1){
- obj.scrollLeft-=Math.ceil(obj_w)/50;
- }
- else{
- clearInterval(bw);
- }
- }
- var bw=window.setInterval(h,1)
- //obj.scrollLeft-=parseInt(obj.style.width);
- }
- </script>
- </body>
- </html>
复制代码 |