8.2.1 Google站内搜索代码

可以为你的网站增加Google搜索功能。

Google搜索代码

<!-- Search Google -->
<form method="get" action="http://www.google.com/search">
        <div style="background-color:white">
                <a href="http://www.google.com/intl/zh-CN/">
                        <img src="http://www.google.com/logos/Logo_40wht.gif" border="0" alt="Google" />
                </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 Search" />
        </div>
</form>
<!-- Search Google -->

Google站内搜索代码

把下面代码中的http://www.dreamdu.com/替换成你的域名就可以实现搜索站内信息了。

<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/search">
        <div style="background-color:white">
                <a href="http://www.google.com/">
                        <img src="http://www.google.com/logos/Logo_40wht.gif" border="0" alt="Google" />
                </a>
                <input type="text" name="q" size="31" maxlength="255" value="html" />
                <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 Search" />
                <input type="hidden" name="domains" value="http://www.dreamdu.com/" />
                <br />
                <input type="radio" name="sitesearch" value=" " />
                <label for="sitesearch">搜索WWW</label>
                <input type="radio" name="sitesearch" value="www.dreamdu.com" checked="checked" />
                <label for="sitesearch">搜索梦之都</label>
        </div>
</form>
<!-- SiteSearch Google -->


  • 教程中有什么不懂的地方?发现教程的错误!对教程有什么建议!快快给我留言呀 给猴子留言,我会尽快解答你的问题:)
  • HTML代码