简体   繁体   English

集成 Google 搜索框(不是自定义搜索引擎)

[英]Integrate Google Search Box (not Custom Search Engine)

In a browser like Firefox or Chrome.在 Firefox 或 Chrome 之类的浏览器中。 When I open it up, it shows a homepage with Google search.当我打开它时,它会显示一个带有 Google 搜索的主页。 The search box can show suggestion for every typing and when I press enter it does redirect to google.com with my search query.搜索框可以显示每次输入的建议,当我按下回车键时,它会使用我的搜索查询重定向到 google.com。

I just want to integrate a search box like that.我只想集成一个这样的搜索框。 Is there any easy way to do it without building the suggestion myself?有什么简单的方法可以在不自己建立建议的情况下做到这一点?

Someone said my question duplicated, however my question is different.有人说我的问题重复了,但是我的问题不同。 I need a search box with full suggestion for every typing and I want to search all websites, not the content in my website as Custom Search Engine does.我需要一个为每次输入提供完整建议的搜索框,并且我想搜索所有网站,而不是像自定义搜索引擎那样搜索我网站中的内容。

You can embade google in an iframe.您可以在 iframe 中嵌入 google。

 html, body, iframe { width: 100%; height: 100%; }
 <iframe src="https://www.google.com/search?igu=1"></iframe>

Without the suggestions it's simply:没有建议,它很简单:

 <form action="http://www.google.com/search">
   <input name="q"><input type="submit">
 </form>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM