最新優(yōu)化收藏到網(wǎng)摘代碼(digg,diigo)
更新時間:2007年02月07日 00:00:00 作者:
收藏到網(wǎng)摘這樣應(yīng)該是最為理想的,點(diǎn)擊收藏鏈接在新窗口打開網(wǎng)摘窗口,能自動填寫網(wǎng)摘標(biāo)題及來源地址,如果能自動截取摘要則更好,下面是經(jīng)過我優(yōu)化的代碼:
delicious,和yahoo的都是在新窗口打開
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(del = window.open('http://del.icio.us/login/?url=' + escape(d.location.href) + '&title=' + escape(d.title), 'del','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));del.focus();"><img src="images/Digest/delicious.gif" alt="Del.icio.us" border="0"></a>
<a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=455,left=80,top=80,status=yes,resizable=yes');"><img src="images/Digest/yahoo.gif" alt="Yahoo書簽" border="0"></a>
diglog:能用鼠標(biāo)選中部分作為描述
<a title="鼠標(biāo)選中部分作為描述,提交到diglog.com" href="javascript://" onclick="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.diglog.com/submit.aspx?title='+escape(d.title)+'&url='+escape(d.location.href)+'&description='+escape(t),'keyit','scrollbars=yes,width=500,height=500,left=65,top=20,status=no,resizable=yes'));keyit.focus();"><img src="images/Digest/digit.gif" border="0" alt="提交新發(fā)現(xiàn),Dig it" /></a>
國外digg收藏代碼:
<a href="javascript:window.open('http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))()"><img src="images/Digest/digg.gif" border="0" alt="DIGG this story" /></a>
國外diigo收藏代碼:
<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 style="border:none" alt="diigo it" src="http://www.diigo.com/images/ii_blue.gif" /></a>
另外百度收藏代碼:能用鼠標(biāo)選中部分作為描述
<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"><img src="images/Digest/baidu.gif" border="0" alt="添加到百度搜藏" /></a>
delicious,和yahoo的都是在新窗口打開
復(fù)制代碼 代碼如下:
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(del = window.open('http://del.icio.us/login/?url=' + escape(d.location.href) + '&title=' + escape(d.title), 'del','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));del.focus();"><img src="images/Digest/delicious.gif" alt="Del.icio.us" border="0"></a>
<a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=455,left=80,top=80,status=yes,resizable=yes');"><img src="images/Digest/yahoo.gif" alt="Yahoo書簽" border="0"></a>
diglog:能用鼠標(biāo)選中部分作為描述
復(fù)制代碼 代碼如下:
<a title="鼠標(biāo)選中部分作為描述,提交到diglog.com" href="javascript://" onclick="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.diglog.com/submit.aspx?title='+escape(d.title)+'&url='+escape(d.location.href)+'&description='+escape(t),'keyit','scrollbars=yes,width=500,height=500,left=65,top=20,status=no,resizable=yes'));keyit.focus();"><img src="images/Digest/digit.gif" border="0" alt="提交新發(fā)現(xiàn),Dig it" /></a>
國外digg收藏代碼:
復(fù)制代碼 代碼如下:
<a href="javascript:window.open('http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))()"><img src="images/Digest/digg.gif" border="0" alt="DIGG this story" /></a>
國外diigo收藏代碼:
復(fù)制代碼 代碼如下:
<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 style="border:none" alt="diigo it" src="http://www.diigo.com/images/ii_blue.gif" /></a>
另外百度收藏代碼:能用鼠標(biāo)選中部分作為描述
復(fù)制代碼 代碼如下:
<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"><img src="images/Digest/baidu.gif" border="0" alt="添加到百度搜藏" /></a>
相關(guān)文章
javascript 仿開心網(wǎng)好友印象功能(點(diǎn)擊文字彈出印象框)
這是仿開心網(wǎng)的好友印象添加功能,在輸入框里提交印象詞后,即可顯示在網(wǎng)頁上,點(diǎn)擊文字彈出印象評語提示框。想用的朋友最好在重新美化一下,我覺得還是不錯的。2009-12-12添加到收藏夾的Javascript腳本 for ie,firefox
添加到收藏夾的Javascript腳本 for ie,firefox...2006-12-12