加上Google搜索框

1,打开template/default/header.htm文件
2,找到<!--{if !empty($_SGLOBAL['member']['notenum'])}--><li class="notify"><a href="space.php?do=notice">{$_SGLOBAL['member']['notenum']}条新通知</a></li><!--{/if}-->
3,在后面加入以下代码
<!-- Search Google -->
<li><form method="get" action="http://www.google.cn/custom" target="google_window">
<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-6796577311614306"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="GB2312"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="cof"

value="GALT:#0066CC;GL:1;DIV:#ffffff;VLC:336633;AH:center;BGC:FFFFFF;LBGC:FF9900;ALC:0066CC;LC:0066CC;T:000000;GFNT:666666;GIMP:666666;FORID:1"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</table></form></li>
<!-- Search Google -->
4,如果你有Google的AdSense帐号,记得把代码中"pub-6796577311614306"这一段改为你的帐号代码,不然你就在帮我走流量啦~~
5,如果没有Google的AdSense帐号,赶紧去申请吧,申请网址:
https://www.google.com/adsense/g-app-single-1

你可能感兴趣的:(Google,search,Class,input,action,div)