阅读:1746回复:3
求助有道词典站内搜索
现在在用谷歌或百度站内搜索小书签,非常好用。
不过,我希望能有哪位高人帮我修改一下,重新写一个小书签,只针对有道词典的(http://dict.youdao.com/),当我点击它时,填入需要搜索的内容,即可给出这个网站内的所有包括已输入搜索词有关的条目。 谢谢! |
|
1楼#
发布于:2012-04-30 11:28
例如,如何对下面两个书签修改:
谷歌站内: javascript:q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22%E8%AF%B7%E8%BE%93%E5%85%A5%E5%85%B3%E9%94%AE%E8%AF%8D:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.google.com/search?num=100&hl=zh-CN&newwindow=1&q='+q+'&sitesearch='+location.host+'');window.open(qlocation);}%20void%200 百度站内: javascript:var%20Bar=location.host+"";q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22\u8BF7\u8F93\u5165\u641C\u7D22\u7684\u5173\u952E\u8BCD:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.baidu.com/s?&ie=UTF-8&oe=UTF-8&cl=3&rn=100&wd=%20%20'+q+'%20%20%20site:%20'+Bar+'');window.open(qlocation);}%20void%200 |
|
2楼#
发布于:2012-04-30 11:28
javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt("\u8BF7\u8F93\u5165\u641C\u7D22\u7684\u5173\u952E\u8BCD:"); if (q!=null) {var qlocation=('http://dict.youdao.com/search?q=' + q);window.open(qlocation);} void 0 |
|
3楼#
发布于:2012-04-30 11:28
感谢yfdyh000,真是高人啊。
这下方便多了。 |
|