13

基本上我有一个网站。我有一个正确设置的站点地图,所以我假设谷歌知道我的所有页面。我在一些网站上看到,搜索表单会指向一个带有原始网站外壳的页面,但结果显然是由 Google 提供的。与codinghorror.com 的搜索类似,但他的结果并未显示在他的网站布局中。

知道我在说什么或如何实现这一目标吗?

4

6 回答 6

14

2008 年 11 月:像这样(但您会在此处找到 2012 年更新的示例

<form method="get" action="http://www.google.com/search">

<div style="border:1px solid black;padding:4px;width:20em;">
<table border="0" cellpadding="0">
<tr><td>
<input type="text"   name="q" size="25"
 maxlength="255" value="" />
<input type="submit" value="Google Search" /></td></tr>
<tr><td align="center" style="font-size:75%">
<input type="checkbox"  name="sitesearch"
 value="askdavetaylor.com" checked /> only search Ask Dave Taylor<br />
</td></tr></table>
</div>

</form>

为了在单独的框架中显示结果,您可以使用此站点作为示例。

那将是这样的:

<html>
<head>
    <meta http-equiv="Content-Language" content="en-gb">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

    <script language="javascript" type="text/javascript">
    function showFrame () {
        var e = document.getElementById("if1");
        e.style.visibility = "visible" ;
    }
    </script>
</head>

<body>
    <p> </p>
    <p>
    <span id="spSearch" onclick="showFrame()">Search</span>
    </p>
    <p> </p>
    <p><iframe name="I1" id="if1" width="100%" height="254" style="visibility:hidden" src="http://www.google.co.uk">
        Your browser does not support inline frames or is currently configured not to display inline frames.
    </iframe></p>
</body>
</html>
于 2008-11-08T20:33:06.257 回答
13

https://cse.google.com/cse/

^ 也许您正在寻找 Google 自定义搜索引擎

于 2008-11-08T21:01:41.050 回答
5

对于基于主要 Google 索引的免费解决方案,使用site:查询并且只对外观进行少量控制,请尝试使用Google 自定义搜索引擎

花几百美元,拥有更全面和最新的网站索引,并完全控制外观,试试Google Site Search

对于需要完全控制索引和搜索体验的各个方面,并且需要索引中包含数千到数百万项的任何内容的企业,请尝试使用Google Search Appliance

于 2008-11-14T09:34:08.497 回答
3

作为列出的另一个回答者,我相信自定义搜索是您正在寻找的。

只是想提供更多信息。谷歌也有网站搜索,但你需要付费。

看看谷歌网站管理员工具: http ://www.google.com/webmasters/

特别是: http ://www.google.com/sitesearch/

于 2008-11-08T23:24:52.383 回答
1

进行自定义 google 搜索的一种简单方法是使用 adsense 进行搜索,它允许您:

  • 在一个或多个站点或整个 Internet 中搜索。
  • 在新窗口、当前窗口或 iframe 中打开。
  • 自定义搜索结果的颜色。
  • 它还可以为您对广告的任何点击支付几分钱。
于 2008-11-08T20:48:40.560 回答
-1

我之前对另一个问题提出了同样的答案,所以这就是答案

Go to this link https://www.google.com/cse/ and create account Create your custom search box Customize looks as your wish Copy the code after customizing Paste in your blog or website where you want the search box to appear..

And if you want search box like my site http://www.latestgames2.com/ just customized all the colors and shapes

于 2013-11-17T05:00:46.970 回答