将Google自动填充功能添加到Google搜索栏中? [英] Add Google autocomplete to Google search bar?

查看:79
本文介绍了将Google自动填充功能添加到Google搜索栏中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自己喜欢的网站等为自己创建一个主页.该页面的中间还包含一个google搜索栏.

 <form id="googleSearch" method="get" action="https://www.google.com/search">
  <input id="googleSearchBar" type="text" name="q" size="31" value="">
</form> 

有什么方法可以将Google的自动完成功能添加到此搜索栏中?

解决方案

Google提供了一个API来实现您自己的自定义搜索引擎(CSE).请参见此页面,该示例可以解决您的问题. >

I am creating a homepage for myself with websites that I like etc. It also includes a google search bar in the middle of the page.

<form id="googleSearch" method="get" action="https://www.google.com/search">
  <input id="googleSearchBar" type="text" name="q" size="31" value="">
</form>

Is there any way that I can add Google's autocomplete to this search bar?

解决方案

Google offers an API to implement your own Custom Search Engine (CSE) for this purpose. See this page for an example which solves exactly your issue.

这篇关于将Google自动填充功能添加到Google搜索栏中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆