And*_*son 11 search google-custom-search
基本上我有一个网站.我有一个正确设置的站点地图,因此我假设Google知道我的所有页面.我在某些网站上看到,搜索表单会显示一个包含原始网站外壳的页面,但结果显然是由Google提供的.与codinghorror.com的搜索类似,但他的搜索结果并未显示在他的网站布局中.
知道我在说什么或如何实现这个目标?
Von*_*onC 12
像这样
<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>
Run Code Online (Sandbox Code Playgroud)
要在单独的框架中显示结果,请以此站点为例.
这将是:
<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>
Run Code Online (Sandbox Code Playgroud)
对于基于主要Google索引的免费解决方案,该解决方案使用site:查询并仅对外观进行一点控制,请尝试使用Google自定义搜索引擎。
只要花几百美元,就可以拥有更全面,最新的网站索引,并完全控制外观,请尝试使用Google网站搜索。
对于需要完全控制索引各个方面和搜索体验并且需要索引中成千上万项的企业,请尝试使用Google Search Appliance。