草根站长论坛's Archiver

admin 发表于 2008-4-19 14:16

共享一段很漂亮的加入收藏夹和收藏到网摘的代码

演示见:[url=http://www.movget.com/][color=#0000ff]http://www.movget.com[/color][/url]  鼠标放到右上角那个“收藏本站”!
iM!Q3t-VW @,}*j(E;|9T CSS代码: fY;n_\ g]
[font=NSimsun][quote][font=NSimsun][code] ~U9l|)BY%T&F
[code]<style type="text/css">
X3U(X(Y:A4lBn_k #shoucang{
1?9D1i%Bh1Pj.n         overflow:auto;text-align:center;margin-top:3px;margin-right:3px;
+R0g5|i5W/W'u }l0Ti(~"}3{\(n+ZZ&a
#shoucang a{
` ot1}%}Bb%SF         font-size:20px;text-decoration:none;
^7~s;Y:@7TZZ;d }
R,V}~ Bk S)E B #shoucang a:hover{v o7F(cm U2\ U
        font-size:20px;text-decoration:underline;P}@ UV oaB
}                  b PL0r_a:]
</style>   [/code][/font]`J ?Jp C,Q-X
以下是调用代码:(可加在网页HTML任何部分)
6u,x6L:lh$e;C"w [font=NSimsun][code] 4Dd'C5F4w
<DIV id="shoucang" onmouseover='document.getElementById("wangzhai").style.display="block";scj.innerHTML="点击加入收藏夹";' onmouseout='document.getElementById("wangzhai").style.display="none";scj.innerHTML="收藏本站";' style="POSITION: absolute;top:0px;right:0px;">
C~B [_ <a href="javascript:window.external.AddFavorite('http://www.movget.com', '魔戒电影搜索 - 最强大的电影搜索引擎!')"><span id="scj">收藏本站</span></a>%CM(P Y)QR;m
<div id="wangzhai" style="display:none"><script language='javascript' src='/wangzhai/wangzhai.js'></script></div>/G1W}] hU"k L f
</DIV>[/code]/wangzhai/wangzhai.js代码:
f6P+k"WP N [/font][font=NSimsun]document.writeln("<a href=\"javascript:u=location.href;t=document.title;c = %22%22 + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=%22http:\/\/cang.baidu.com\/do\/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=ien#nw=1%22;window.open(url,%22_blank%22,%22scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes%22); void 0\" title=\"收藏到Baidu搜藏\"><img border=\"0\" src=\"..\/wangzhai\/baidu.gif\" alt=\"收藏到Baidu搜藏\"><\/a> <a href=\"javascript:window.open(\'http:\/\/shuqian.qq.com\/post?title=\'+encodeURIComponent(document.title)+\'&uri=\'+encodeURIComponent(document.location.href)+\'&jumpback=2&noui=1\',\'favit\',\'width=960,height=600,left=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes\');void(0)\"><img src=\"..\/wangzhai\/qq.gif\" alt=\"收藏到QQ书签\"  border=\"0\" title=\"收藏到QQ书签\"><\/a> <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=75,top=20,status=no,resizable=yes\'));vivi.focus();\"><img src=\'\/wangzhai\/vivi.gif\' alt=\'收藏到新浪ViVi\' border=\'0\'><\/a> <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.hzhai.com\/icollect.asp#t=\'+escape(d.title)+\'&u=\'+escape(d.location.href)+\'&c=\'+escape(t),\'hzhai\',\'scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));hzhai.focus();\"><img src=\'\/wangzhai\/hzhai.gif\' alt=\'收藏到红摘\' border=\'0\'><\/a> <a href=\"javascript:location.href=\'http:\/\/del.icio.us\/post?&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img src=\'\/wangzhai\/delicious.gif\' alt=\'收藏到Del.icio.us\' border=\'0\'><\/a> <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:\/\/myweb.cn.yahoo.com\/popadd.html?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title),\'yahoo\',\'scrollbars=no,width=720,height=420,left=75,top=20,status=no,resizable=yes\'));vivi.focus();\"><img src=\'\/wangzhai\/yahoo.gif\' alt=\'收藏到Yahoo书签\' border=\'0\'><\/a> <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=575,left=75,top=20,status=no,resizable=yes\'));keyit.focus();\"><img src=\'\/wangzhai\/365key.gif\' alt=\'收藏到365Key网摘\' border=\'0\'><\/a><br><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=75,top=20,status=no,resizable=yes\'));yesky.focus();\"><img src=\'\/wangzhai\/yesky.gif\' alt=\'收藏到天极网摘\' border=\'0\'><\/a> <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=\'\/wangzhai\/wozhai.gif\' alt=\'收藏到我摘\' border=\'0\'><\/a> <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,status=no,resizable=yes\'));keyit.focus();\"><img src=\'\/wangzhai\/poco.gif\' alt=\'收藏到POCO网摘\' border=\'0\'><\/a>  <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=80,top=80,status=no,resizable=yes\'));\"><img src=\'\/wangzhai\/hexun.gif\' alt=\'收藏到和讯网摘\' border=\'0\'><\/a> <a href=\"javascript:location.href=\'http:\/\/www.google.com\/bookmarks\/mark?op=add&bkmk=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img src=\'\/wangzhai\/google.gif\' alt=\'收藏到Google书签\' border=\'0\'><\/a>  <a href=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(blog=window.open(\'http:\/\/www.bolaa.com\/CommendBlog\/SmallLogin.aspx?title=\'+escape(d.title)+\'&newspath=\'+escape(d.location.href)+\'&subtitle=\'+escape(t),\'bolaa\',\'width=400px,height=400px\'));blog.focus();\"><img src=\'\/wangzhai\/bolaa.gif\' alt=\'收藏到博拉网\' border=\'0\'><\/a>  <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.cn3.cn\/user\/addurl.asp?t=\'+escape(d.title)+\'&u=\'+escape(d.location.href)+\'&c=\'+escape(t),\'keyit\',\'scrollbars=no,width=490,height=450,left=120,top=50,status=no,resizable=yes\'));keyit.focus();\"><img src=\'\/wangzhai\/cn3.gif\' alt=\'收藏到天下图摘\' border=\'0\'><\/a>");[/font][/quote][/font]
w.I9J1G[$L1f [/code]{5U\:{L/Q9zx
[size=6][color=#ff0000]使用说明:G)T1M \g'yGeDz
n AI;C&FR r`
[/color][/size]1.CSS代码可以加入到你自己的CSS文件,或者直接加在你要显示的页面的<head>部分
.P]7S c4l$aq 2.调用代码直接加入到你要显示的页面的HTML任何部分都能显示在右上角,其他位置自己调整:POSITION: absolute;top:0px;right:0px;
R!zxs ?k/l9F 3./wangzhai/wangzhai.js 地址按自己JS文件路径来调用。8[(sr%[R
y6hbn$}
完整源代码,图片及使用说明下载地址:[url=http://www.movget.com/][color=#0000ff]http://www.movget.com/[/color][/url]收藏.rar/WzXLTXP
1G7A%K yx4d bb6OZ5r\
[[i] 本帖最后由 admin 于 2008-4-19 14:17 编辑 [/i]]

114vps 发表于 2008-4-19 22:43

支持一下.........:31:

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.