怎样在网页中加入GOOGLE搜索
加入如下代码即可[code]<!-- Search Google -->
<center>
<form method="get" action="[url]http://www.google.cn/custom[/url]" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="[url]http://www.google.com/[/url]">
<img src="[img]http://www.google.com/logos/Logo_25wht.gif[/img]" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">输入您的搜索字词</label>
<input type="text" name="q" size="20" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">提交搜索表单</label>
<input type="submit" name="sa" value="搜索" id="sbb"></input>
<input type="hidden" name="client" value="pub-8796585520586173"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="GB18030"></input>
<input type="hidden" name="oe" value="GB18030"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
[/code] <!-- Search Google -->
<center>
<form method="get" action="[url]http://www.google.cn/custom[/url]" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="[url]http://www.google.com/[/url]">
<img src="[img]http://www.google.com/logos/Logo_25wht.gif[/img]" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">输入您的搜索字词</label>
<input type="text" name="q" size="20" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">提交搜索表单</label>
<input type="submit" name="sa" value="搜索" id="sbb"></input>
<input type="hidden" name="client" value="pub-8796585520586173"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="GB18030"></input>
<input type="hidden" name="oe" value="GB18030"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
显示了没? <form action="http://www.baidu.com/baidu" method=get name="query" target="_blank">
<div align="center">
<input name=tn type=hidden value=baidu>
<a href="http://www.baidu.com/"><img src="http://www.baidu.com/images/baidu_logo.gif"
alt="Baidu" align="bottom" border="0"></a>
<input type=text name=word size=15>
<input type="submit" value="百度搜索">
</div>
</form> <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> 所以LZ的代码有误
应该是
baidu
程序代码
<form action="[url]http://www.baidu.com/baidu[/url]" method=get name="query" target="_blank">
<div align="center">
<input name=tn type=hidden value=baidu>
<a href="[url]http://www.baidu.com/[/url]"><img src="[img]http://www.baidu.com/images/baidu_logo.gif[/img]"
alt="Baidu" align="bottom" border="0"></a>
<input type=text name=word size=15>
<input type="submit" value="百度搜索">
</div>
</form>
程序代码
<form method=get action="[url]http://www.google.com/search[/url]">
<table bgcolor="#FFFFFF"><tr><td>
<a href="[url]http://www.google.com/intl/zh-CN/[/url]">
<img src="[img]http://www.google.com/logos/Logo_40wht.gif[/img]"
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>
页:
[1]