掸子
火狐狸
火狐狸
  • UID7293
  • 注册日期2005-07-14
  • 最后登录2006-06-14
  • 发帖数101
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:3255回复:9

如何添加站内搜索?

楼主#
更多 发布于:2005-07-14 13:39
我用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里面怎么才能拥有这个功能?
在搜索了一下这个论坛里面的文章,没有找到解决的办法。
掸子
火狐狸
火狐狸
  • UID7293
  • 注册日期2005-07-14
  • 最后登录2006-06-14
  • 发帖数101
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2005-07-14 13:39
三翻领:如果楼主一定要用添加代码的方法,那我帮不了你,但我知道一个既简单又可靠的办法,googlebar回到原帖

我不喜欢安装工具栏,我的所有浏览器都不安装工具栏的。
其实这个问题早就解决了,在台湾社区。
http://forum.moztw.org/viewtopic.php?p=47031#47031
游客

返回顶部