- UID
- 901
- 帖子
- 1004
- 精华
- 2
- 贡献
- 0
- 推广
- 0
- 有效BUG
- 0
- 注册时间
- 2005-5-4
|
:P[size=3][color=Maroon]这是一个网友给马桶添加的Google站内搜索。哪位能人把它改编一下,加到TW的搜索栏里?[/color][/size]
站内搜索=<script language="JavaScript">var searchText = external.m2_search_text;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>
[[i] Last edited by yggcwx on 2005-5-16 at 04:00 PM [/i]] |
|