阅读:1969回复:1
哪位高手帮忙修改出站内搜索的搜索引擎
希望能够在狐狸里面添加站内搜索。
详情见和相关图片http://www.firefoxcn.com/bbs/Announce/Announce.asp?BoardID=100&ID=6529 我看过相关的搜索引擎修改的帖子,可是不知道怎么做。 下面的资料不知道有没有参考价值: mathon的google搜索引擎代码 Google站内搜索用于在当前浏览的站点范围内搜索指定关键字 引擎代码 <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> </script> 这是 baidu 的站内搜索代码 <script language="JavaScript">var searchText = external.m2_search_text(%max_security_id);var root;var rooturl;getRoot();var URL="http://www.baidu.com/s?ie=UTF-8&ct=0&cl=3&f=8&bs=site%3Awww.f1suji.com+%C4%E3%BA%C3&sr=&z=&wd=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> 希望狐狸高手能尽快研究出这个功能,造福所有狐狸 |
|
1楼#
发布于:2005-07-18 01:27
上面的资料来自这里http://forum.maxthon.com/forum/index.php?showtopic=19620&hl=%E7%AB%99%E5%86%85%E6%90%9C%E7%B4%A2
|
|