I want to append my own text beforehand to a google search in html

我的梦境 提交于 2019-12-11 16:22:45

问题


This explains how to add a search bar in html: Creating a Google search box using HTML form

What if we want to previously append some of our own text to the search? for example,

when I input a text into the search, google should search for "hotels at input-text"

This creates the search bar:

<form role="search" method="get" id="searchform" class="searchform" action="http://www.google.com/search?hl=en-GB&source=hp&+q=">
  <div id="gform">
  <label class="screen-reader-text" for="s"></label>
  <input type="text" value="" name="q" id="s">
  <input type="submit" class="btn fa-input" value="&#xf002;" style="font-family: FontAwesome;"> 
</div>
</form>

来源:https://stackoverflow.com/questions/57687805/i-want-to-append-my-own-text-beforehand-to-a-google-search-in-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!