qq三国90装备:怎样在自己的网站建立google搜索?

来源:百度文库 编辑:高校问答 时间:2024/05/02 04:58:16
怎样在自己的网站建立google搜索?
比如说:插入一个文本框和一个按钮,点击按钮。可以转道google并显示搜索的内容;

很简单,在网页里写入以下代码:
<!-- Search Google -->
<center>
<form method=get action="http://www.google.com/search">
<table bgcolor="#FFFFFF"><tr><td>
<a href="http://www.google.com/intl/zh-CN/">
<img src="http://www.google.com/logos/Logo_40wht.gif"
border="0" alt="Google" align="absmiddle"></a>
<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 搜索">
</td></tr></table>
</form>
</center>
<!-- Search Google -->

晕//。。试试友情连接吧。。应该可以的直接把网站放那里就行了。。

在你网页加入以下代码
<!-- 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="你的域名"><br>
<input type=radio name=sitesearch value=""> 搜索WWW
<input type=radio name=sitesearch value="你的域名" checked> 搜索 你的域名
</font>
</td></tr></table>
</form>
<!-- SiteSearch Google -->

让用户搜索您的网站
您的网页也想拥有 Google 搜索吗,您希望让用户搜索您网站上的内容吗?您只须将下面代码片断添加在您的网站上,并且将 “YOUR DOMAIN” 换成您自己的域名,比如 http://news.google.com,就可以实现站内搜索。
就在google帮助页:
http://www.google.com/intl/zh-CN/searchcode.html