网址:
http://www.google.com/searchcode.html
图:
代码:
<!--
SiteSearch Google
-->
< form method =get action ="http://www.google.com/search" >
< table bgcolor ="#FFFFFF" >< tr >< td >
< a href ="http://www.google.com/" >
< img src ="http://www.google.com/logos/Logo_40wht.gif"
border ="0" alt ="Google" ></ a >
</ td >
< td >
< input type =text name =q size =31 maxlength =255 value ="" >
< input type =hidden name =ie value =GB2312 >
< input type =hidden name =oe value =GB2312 >
< input type =hidden name =hl value =zh-CN >
< input type =submit name =btnG value ="Google 搜索" >
< font size =-1 >
< input type =hidden name =domains value ="YOUR DOMAIN NAME" >< br >
< input type =radio name =sitesearch value ="" > 搜索WWW
< input type =radio name =sitesearch value ="YOUR DOMAIN NAME" checked > 搜索YOUR DOMAIN NAME
</ font >
</ td ></ tr ></ table >
</ form >
<!-- SiteSearch Google -->
< form method =get action ="http://www.google.com/search" >
< table bgcolor ="#FFFFFF" >< tr >< td >
< a href ="http://www.google.com/" >
< img src ="http://www.google.com/logos/Logo_40wht.gif"
border ="0" alt ="Google" ></ a >
</ td >
< td >
< input type =text name =q size =31 maxlength =255 value ="" >
< input type =hidden name =ie value =GB2312 >
< input type =hidden name =oe value =GB2312 >
< input type =hidden name =hl value =zh-CN >
< input type =submit name =btnG value ="Google 搜索" >
< font size =-1 >
< input type =hidden name =domains value ="YOUR DOMAIN NAME" >< br >
< input type =radio name =sitesearch value ="" > 搜索WWW
< input type =radio name =sitesearch value ="YOUR DOMAIN NAME" checked > 搜索YOUR DOMAIN NAME
</ font >
</ td ></ tr ></ table >
</ form >
<!-- SiteSearch Google -->
=================
说明:
您的网页也想拥有 Google 搜索吗,您希望让用户搜索您网站上的内容吗?您只须将下面代码片断添加在您的网站上,并且将 “YOUR DOMAIN” 换成您自己的域名,比如 http://news.google.com,就可以实现站内搜索。
您可以根据个人品味对其进行修改,如取消居中,调整其宽度,或改变背景颜色,等等。(但请注意,Google 徽标的背景是白色,而不是透明。)如果您喜欢具有其它背景颜色或大小的 Google 徽标,这里有不同的徽标贴图可供选用。您可以将其中任何徽标替换到以下搜索代码中。
注意:如果您的网站编码不是 GB2312,您需要将代码中的两个 GB2312 换成您网站的编码,比如 Big5。