看看导航条的上方,嘿嘿,本人刚刚加上的搜索工具条,试试灵不,怎么样,想要不?很早就知道很多仿百度,仿google的网站,在搜索框总输入我们要查找的关键字,嘿,还真能跳转到真正的百度或者google的搜索结果。一直想知道他们的搜索框是怎么添加上去的,自己的网页或者博客要能加上这个搜索框,也算是给我们的站点加点新东西,更能吸引人。好啦好啦,废话不多说了,将这个代码共享给大家。
<!-- Search Google -->
<form method="get" action="http://www.google.cn/search" target="google_window">
<table bgcolor="#000000">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25blk.gif" border="0" alt="Google" align="middle"></img></a>
<label for="sbi" style="display: none">输入您的搜索字词</label>
<input type="text" name="q" size="50" 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-4036552512302920"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="prog" value="aff"></input>
<input type="hidden" name="channel" value="8183805013"></input>
<input type="hidden" name="ie" value="utf-8"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
<!-- Search Google -->
自己试试不,不过有时候可能会查询的东西都是乱码,本人还不知道这是为什么,网页编码的问题吧,有什么好的解决方法在此留言吧,兴许对路过的朋友有所帮助,代表大家谢谢你。