阅读:3622回复:9
如何添加站内搜索?
我用mxthon的时候,可以在搜索引擎里面直接添加搜索代码:
<script language="JavaScript">var searchText = external.m2_search_text(%max_security_id);var root;var rooturl;getRoot();var URL="http://www.google.com/search?hl=zh-CN&ie=UTF-8&q=site:"+rooturl+"+"+encodeURIComponent(searchText);window.open(URL);function getRoot() {updir = location.href.substring(0,location.href.substring(0,location.href.length-1).lastIndexOf('/')+1);updir2 = location.href.substring(location.href.substring(0,location.href.length-1).lastIndexOf('http://'),location.href.length);updir2 = updir2.substring(7,location.href.length);if (updir.indexOf("htm#http") != -1 && updir2.indexOf("www") == 0 ){root="http://"+updir2;};if (updir.indexOf("htm#http") != -1 && updir2.indexOf("www") != 0 ){root="http://www."+updir2;};root=window.location.href.split("/");rooturl=root[2];};</script> 就可以进行站内搜索了。 不知道在ff里面怎么才能拥有这个功能? 在搜索了一下这个论坛里面的文章,没有找到解决的办法。 |
|
1楼#
发布于:2005-07-14 13:39
我也想知道,以前好象看过,搜索了一下没找到
|
|
2楼#
发布于:2005-07-14 13:39
以前是不是谁写过在FF里可以有的代码书签啊,我怎么找不到了
|
|
3楼#
发布于:2005-07-14 13:39
继续关注
|
|
4楼#
发布于:2005-07-14 13:39
用户被禁言,该主题自动屏蔽! |
|
5楼#
发布于:2005-07-14 13:39
三翻领:如果楼主一定要用添加代码的方法,那我帮不了你,但我知道一个既简单又可靠的办法,googlebar回到原帖 我不喜欢安装工具栏,我的所有浏览器都不安装工具栏的。 其实这个问题早就解决了,在台湾社区。 http://forum.moztw.org/viewtopic.php?p=47031#47031 |
|
6楼#
发布于:2005-07-14 13:39
javascript:var%20ax=prompt('%E8%B0%B7%E6%AD%8C%E7%AB%99%E5%86%85%E6%90%9C%E7%B4%A2\n%E8%AF%B7%E8%BE%93%E5%85%A5%E6%90%9C%E7%B4%A2%E5%85%B3%E9%94%AE%E5%AD%97','');if(ax.length>0){window.open('http://www.google.com/search?hl=zh-CN&client=opera&q=site:'+encodeURIComponent(location.hostname)+'%20'+encodeURIComponent(ax))};void(0)
把上面的代码添加为书签即可 |
|
7楼#
发布于:2005-07-14 13:39
谢谢楼上,很好用。
|
|
8楼#
发布于:2005-07-14 13:39
可以自己制作bar,,当然要适用于ff的
|
|
|
9楼#
发布于:2005-07-14 13:39
用UC脚本还可以实现
添加站内搜索到搜索引擎列表,支持搜索别名 |
|