收藏到网摘这样应该是最为理想的,点击收藏链接在新窗口打开网摘窗口,能自动填写网摘标题及来源地址,如果能自动截取摘要则更好,下面是经过我优化的代码:
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('yun_qi_img/delicious" alt="Del.icio.us" border="0"></a>
<a href="#" onclick="window.open('yun_qi_img/yahoo.gif" alt="Yahoo书签" border="0"></a>
diglog:能用鼠标选中部分作为描述
复制代码 代码如下:
<a title="鼠标选中部分作为描述,提交到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('yun_qi_img/digit.gif" border="0" alt="提交新发现,Dig it" /></a>
国外digg收藏代码:
复制代码 代码如下:
<a href="javascript:window.open('yun_qi_img/digg.gif" border="0" alt="DIGG this story" /></a>
国外diigo收藏代码:
复制代码 代码如下:
<a href="#" onclick="var s=document.createElement('script');s.type='text/javascript';s.src=https://yunqi-tech.oss-cn-hangzhou.aliyuncs.com/ii_blue.gif /></a>
另外百度收藏代码:能用鼠标选中部分作为描述
复制代码 代码如下:
<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=%22yun_qi_img/core.html" border="0" alt="添加到百度搜藏" /></a>