代码之家  ›  专栏  ›  技术社区  ›  Hasan Merkit

如何在HTML中使用Google Autocomplete?

  •  0
  • Hasan Merkit  · 技术社区  · 3 年前

    我是一个不懂javascript的人。现在。我用PHP做了一个小主页设计。有一个文本框,它搜索谷歌。然而,我找不到如何添加自动完成。

    我的主页。php的HTML结果:

    <form action="https://www.google.com/search" method="GET" role="search"><center>
    Search Web:<br>
    <input id="meow" class="FormControl" maxlength="2048" name="q" type="text" autocomplete="off" autofocus="""><br>
    <button type="submit" class="Button Button--primary">Google Search</button>
    <br><br>This page will direct you to the Google search engine.
    

    我在互联网上看到一个JSON文件可以实现这一点,但我不知道如何使用它。

    http://google.com/complete/search?client=chrome&q=never+gonna+g
    
    0 回复  |  直到 3 年前