Board logo

标题: [交流] 谁能简单教教我怎么做类似“分享到饭否”的插件? [打印本页]

作者: xlcike    时间: 2009-3-16 21:17     标题: 谁能简单教教我怎么做类似“分享到饭否”的插件?

我已经有代码了 但是不知道怎么在html文件里面添加 我自己添加后的点了没反应 高手指点一下 谢谢

<!--
document.write("<CENTER><div ID='wangzhai'><strong><font color=#0E63E4>收</font><font color=#58C600>藏</font><font color=#996699>到</font><font color=#C00012>网</font><font color=#795f00>摘</font><font color=#327F00>:</font></strong>");
document.writeln("<a href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;if(window.clipboardData) clipboardData.setData('Text',t);window.open('http:\/\/shuqian.qq.com\/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','resizable,location,menubar,toolbar,scrollbars,status');void(0)\" target=_self title='QQ书签'><IMG SRC=\"/exec/qq.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='QQ书签'><\/a>");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,38))+'&iu='+encodeURIComponent(location.href)+'&dc='+encodeURIComponent(t.substring(0,120))+'&fr=ien#nw=1','_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=Baidu收藏><IMG SRC=\"/exec/baidu.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='Baidu收藏'></a> ");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title.substring(0,38))+'&annotation='+encodeURIComponent(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=\"google收藏\"><IMG SRC=\"/exec/google.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='google收藏'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://del.icio.us/save?jump=yes&notes='+encodeURIComponent(t)+'&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=\"del.icio.us\"><IMG SRC=\"/exec/delicious.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='del.icio.us'></a> ");
document.write(" <a target=\"_self\" href=\"javascript: metas=document.getElementsByTagName('meta');t=metas[2].content;mywebyx=document;mywebya=encodeURIComponent(mywebyx.location.href);mywebyt=encodeURIComponent(mywebyx.title);mywebyd=encodeURIComponent(t);open('http://myweb.cn.yahoo.com/popadd.html?src=iebookmark&url='+mywebya+'&title='+mywebyt+'&summary='+mywebyd,'_blank','resizable,location,menubar,toolbar,scrollbars,status');void(0);\" title=\"雅虎收藏\"><IMG SRC=\"/exec/yahoo.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='雅虎收藏'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;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),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));vivi.focus();\"><IMG SRC=\"/exec/vivi.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='新浪ViVi收藏'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/365key.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='365天天网摘'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','_blank','resizable,location,menubar,toolbar,scrollbars,status'));yesky.focus();\"><IMG SRC=\"/exec/yesky.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='天极网摘'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;void(wozhai=window.open('http://www.wozhai.com/wozhai/Cento.asp#t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));wozhai.focus();\"><IMG SRC=\"/exec/wozhai.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='我摘'></a> ");
document.write(" <a target=\"_self\" href=\"javascript:d=document; metas=document.getElementsByTagName('meta');t=metas[2].content;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.8gul.cn/templets/img/tv8_logo.gif','_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/poco.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='POCO'></a> ");
document.write(" <a target=\"_self\" 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),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/hexun.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='和讯网摘'></a> ");
document.write("<a target=\"_self\" title=\"推荐到diglog\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http:\/\/www.diglog.com\/submit.aspx?title='+escape(d.title.replace(/ -.*中国保健资讯网/,''))+'&url='+escape(s.replace('www.outdohealth.com','www.medicalhealth.com.cn'))+'&description='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/digit.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='推荐到diglog'><\/a> ");
document.write("<a target=\"_self\" title=\"人人网摘\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http://www.renrenweb.com/bookmark.aspx?t='+escape(d.title)+'&u='+escape(s)+'&d='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/renren.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='人人网摘'><\/a> ");
document.write("<a target=\"_self\" title=\"通摘\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http://share.allnet.cn/SaveIt.aspx?title='+escape(d.title)+'&url='+escape(s)+'&summary='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/tong.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='通摘'><\/a> ");
document.write("<a target=\"_self\" title=\"推荐到帖易\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http:\/\/my.teein.com\/addfavo?reloadurl=\/favo&topic='+escape(d.title)+'&posturl='+escape(s)+'&memo='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/teein.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='帖易'><\/a> ");
document.write("<a target=\"_self\" title=\"推荐到乐收\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;if(window.clipboardData) clipboardData.setData('Text',t);void(keyit=window.open('http:\/\/leshou.com\/post?act=shou&reuser=&title='+encodeURIComponent(d.title)+'&url='+escape(s)+'&intro='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"http://leshou.com/asset/images/feature.png\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='乐收'><\/a> ");
document.write("<a target=\"_self\" title=\"推荐到纯我\" href=\"javascript:d=document;if(window.clipboardData) clipboardData.setData('Text',d.title);s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;void(keyit=window.open('http:\/\/www.chunw.com\/sc\/index2.asp?u='+escape(s)+'&intro='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/chunw.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='纯我'><\/a> ");
document.write("<a target=\"_self\" title=\"收藏到奇虎口袋\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;if(window.clipboardData) clipboardData.setData('Text',t);window.open('http://koudai.qihoo.com/reg_create.html?url='+escape(location.href)+'&title='+document.title,'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\"><IMG SRC=\"/exec/qihoo.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='奇虎口袋'></a> ");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://www5.bolaa.com/CommendBlog/SmallCommend.aspx?title='+escape(document.title.substring(0,30))+'&link='+encodeURIComponent(location.href)+'&synopsis='+escape(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" ><IMG SRC=\"/exec/bolaa.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='博啦'></a> ");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://fanfou.com/sharer?s=bl&t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(location.href)+'&d='+encodeURIComponent(t),'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" ><img src=\"http:\/\/static.fanfou.com\/img\/icon.gif\" alt=\"分享到饭否\" \/><\/a>");
document.write(" <a target=\"_self\" href=\"javascript:d=document;s=d.location.href;metas=document.getElementsByTagName('meta');t=metas[2].content;if(window.clipboardData) clipboardData.setData('Text',t);void(keyit=window.open('http://digg.com/submit?phase=2&url='+encodeURIComponent(s)+'&title='+encodeURIComponent(d.title),'_blank','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/digg.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='Digg'></a> ");
document.write("<a  target=\"_self\" href=\"javascript:void(keyit=window.open('http://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'_self','resizable,location,menubar,toolbar,scrollbars,status'));\"><IMG SRC=\"/exec/live.gif\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='Live Favorites'></a> ");
document.writeln("<a href=\"#\" onclick=\"var s=document.createElement('script');s.type='text\/javascript';s.src='http:\/\/www.diigo.com\/javascripts\/webtoolbar\/diigolet_b_h_b.js';document.body.appendChild(s);\"><img alt=\"diigo it\" src=\"http:\/\/www.diigo.com\/images\/ii_blue.gif\" \/><\/a>");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://www.furl.net/storeIt.jsp?t='+encodeURIComponent(document.title.substring(0,38))+'&u='+encodeURIComponent(location.href)+'&dc='+encodeURIComponent(t.substring(0,120))+'&fr=ien#nw=1','_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=furl收藏><IMG SRC=\"/exec/furl.png\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='furl收藏'></a> ");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Name='+encodeURIComponent(document.title.substring(0,38))+'&Url='+encodeURIComponent(location.href)+'&Description='+encodeURIComponent(t.substring(0,120))+'&fr=ien#nw=1','_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=Blinklist><IMG SRC=\"/exec/blinklist.png\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='Blinklist'></a> ");
document.write("<a target=\"_self\" href=\"javascript:metas=document.getElementsByTagName('meta');t=metas[2].content;window.open('http://reddit.com/submit?title='+encodeURIComponent(document.title.substring(0,38))+'&url='+encodeURIComponent(location.href),'_blank','resizable,location,menubar,toolbar,scrollbars,status'); void 0\" title=reddit><IMG SRC=\"/exec/reddit.png\" WIDTH=16 HEIGHT=16 BORDER=0 ALT='reddit'></a> ");
document.writeln("</div></CENTER>");
-->
作者: hiffy    时间: 2009-3-17 00:31

太难呢
作者: xlcike    时间: 2009-3-17 12:27

2# hiffy

教教我简单修改嘛?我现在分享插件大概有10个了 但是不够用 ....我想继续增加
作者: 61140250    时间: 2009-3-17 13:01

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=bm';a=function(){if(!w.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=0,width=600,height=400'))l.href=f+'.new'+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0)
--------------------------------------------------------
用上面的代码填入链接试试




欢迎光临 世界之窗论坛 (http://bbs.theworld.cn/) Powered by Discuz! 7.2