注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Feed、blog

RSS·「分享」

 
 
 

日志

 
 
关于我

seoblog

网易考拉推荐

网摘代码,网摘源码,网摘插件代码  

2011-07-03 13:01:29|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

网站网摘代码,收藏到网摘这样应该是最为理想的:点击收藏链接在新窗口打开网摘窗口,能自动填写网摘标题及来源地址,如果能自动截取摘要则更好。本页面里收集了几个常见的网摘源码(网摘插件代码)希望能给大家带来方便

首先来一段javascript网摘代码,你可以将它保存到一个js文件中,然后在网站任何地方调用即可。

效果图片:

document.writeln("<a href=\"javascript:location.href=\'http:\/\/myweb.cn.yahoo.com\/popadd.html?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img alt=雅虎收藏夹 src=\"http://img.knowsky.com/img/wangzhai/yahoomyweb-cn.png\" border=0><\/a>")

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=\"百度收藏\"><img alt=百度收藏 src=\"http://img.knowsky.com/img/wangzhai/baidu.gif\" border=0><\/a>" );

document.writeln("                <a href=\"javascript:location.href=\'http:\/\/www.google.com\/bookmarks\/mark?op=add&amp;bkmk=\'+encodeURIComponent(location.href)+\'&amp;title=\'+encodeURIComponent(document.title)\"><img alt=Google书签 src=\"http://img.knowsky.com/img/wangzhai/google.gif\" border=0><\/a> ");

document.writeln("                <a href=\"javascript:location.href=\'http:\/\/myweb2.search.yahoo.com\/myresults\/bookmarklet?u=\'+encodeURIComponent(location.href)+\'&amp;t=\'+encodeURIComponent(document.title)\"><img alt=Yahoo书签 src=\"http://img.knowsky.com/img/wangzhai/yahoo.gif\" border=0><\/a> ");

document.writeln("                <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&amp;title=\'+escape(d.title)+\'&amp;url=\'+escape(d.location.href)+\'&amp;desc=\'+escape(t),\'vivi\',\'scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes\'));vivi.focus();\"><img alt=新浪ViVi src=\"http://img.knowsky.com/img/wangzhai/vivi.gif\" border=0><\/a> ");

document.writeln("                <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:\/\/z.sohu.com\/storeit.do?t=\'+escape(d.title)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t),\'keyit\',\'scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));keyit.focus();\"><img alt=搜狐网摘 src=\"http://img.knowsky.com/img/wangzhai/sohuz.gif\" border=0><\/a> ");

document.writeln("                <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)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t),\'keyit\',\'scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));keyit.focus();\"><img alt=365Key网摘 src=\"http://img.knowsky.com/img/wangzhai/365key.gif\" border=0><\/a> ");

document.writeln("                <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)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t)+\'&amp;st=2\',\'yesky\',\'scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes\'));yesky.focus();\"><img alt=天极网摘 src=\"http://img.knowsky.com/img/wangzhai/yesky.gif\" border=0><\/a> ");

document.writeln("<a href=\"javascript:location.href=\'http:\/\/www.diglog.com\/submit?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img alt=diglog src=\"http://img.knowsky.com/img/wangzhai/diglog.png\" border=0><\/a>")

document.writeln("                <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)+\'&amp;url=\'+escape(u)+\'&amp;excerpt=\'+escape(e),\'HexunBookmark\',\'scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes\'));\"><img alt=和讯网摘 src=\"http://img.knowsky.com/img/wangzhai/hexun.gif\" border=0><\/a> ");

document.writeln("                <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)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t)+\'&amp;img=http:\/\/www.h-strong.com\/blog\/logo.gif\',\'keyit\',\'scrollbars=no,width=475,height=575,status=no,resizable=yes\'));keyit.focus();\"><img alt=POCO网摘 src=\"http://img.knowsky.com/img/wangzhai/poco.gif\" border=0><\/a> ");

document.writeln("                <a href=\"javascript:u=location.href;t=document.title;void(open(\'http:\/\/www.YouNote.com\/NoteIt.aspx?u=\'+escape(u)+\'&amp;t=\'+escape(t)+\'&amp;c=\'+escape(document.selection.createRange().text),\'网络书签\', \'toolbar=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));\"><img alt=YouNote网摘 src=\"http://img.knowsky.com/img/wangzhai/younote.gif\" border=0><\/a> ");

document.writeln("                <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)+\'&amp;newspath=\'+escape(d.location.href)+\'&amp;subtitle=\'+escape(t),\'bolaa\',\'width=400px,height=400px\'));blog.focus();\"><img alt=博拉网 src=\"http://img.knowsky.com/img/wangzhai/bolaa.gif\" border=0><\/a> ");

document.writeln("                <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)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t),\'keyit\',\'scrollbars=no,width=490,height=450,left=120,top=50,status=no,resizable=yes\'));keyit.focus();\"><img alt=天下图摘 src=\"http://img.knowsky.com/img/wangzhai/cn3.gif\" border=0><\/a> ");

document.writeln("                <a href=\"javascript:location.href=\'http:\/\/del.icio.us\/post?&amp;url=\'+encodeURIComponent(location.href)+\'&amp;title=\'+encodeURIComponent(document.title)\"><img alt=Del.icio.us src=\"http://img.knowsky.com/img/wangzhai/delicious.gif\" border=0><\/a>")

document.writeln("<a href=\"javascript:location.href=\'http:\/\/digg.com\/submit?phase=2&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img alt=digg src=\"http://img.knowsky.com/img/wangzhai/digg.png\" border=0><\/a>")

document.writeln("<a href=\"javascript:location.href=\'http:\/\/reddit.com\/submit?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img alt=reddit src=\"http://img.knowsky.com/img/wangzhai/reddit.png\" border=0><\/a>")

document.writeln("<a href=\"javascript:location.href=\'http:\/\/www.spurl.net\/spurl.php?v=3&title=\'+encodeURIComponent(document.title)+\'&url=\'+encodeURIComponent(location.href)\"><img alt=spurl src=\"http://img.knowsky.com/img/wangzhai/spurl.png\" border=0><\/a>")

document.writeln("<a href=\"javascript:location.href=\'http:\/\/www.blinklist.com\/index.php?Action=Blink\/addblink.php&Description=\'+encodeURIComponent(document.title)+\'&Url=\'+encodeURIComponent(location.href)+\'&Title=\'+encodeURIComponent(document.title)\"><img alt=BlinkList src=\"http://img.knowsky.com/img/wangzhai/blinklist.gif\" border=0><\/a>")

document.writeln("<a href=\"javascript:location.href=\'http:\/\/blogmarks.net\/my\/new.php?mini=1&simple=1&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)\"><img alt=blogmarks src=\"http://img.knowsky.com/img/wangzhai/blogmarks.png\" border=0><\/a>")

  评论这张
 
阅读(1145)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017