Skip to content

Instantly share code, notes, and snippets.

@enrique-ramirez
Last active January 2, 2016 21:59
Show Gist options
  • Save enrique-ramirez/8366897 to your computer and use it in GitHub Desktop.
Save enrique-ramirez/8366897 to your computer and use it in GitHub Desktop.
This form will redirect the user to this url: http://google.com/search?q=SEARCHQUERY&tbm=TYPEOFSEARCH No JavaScript needed! :)
<form action="http://google.com/search" method="GET">
<fieldset>
<legend>Search using google</legend>
<label>
My Search Query
<input type="text" name="q" />
</label>
<label>
What do you want to search?
<select name="tbm">
<option value="isch">Images</option>
<option value="vid">Videos</option>
<option value="shop">Products to buy</option>
</select>
</label>
</fieldset>
<div class="buttons">
<input type="submit" value="Search in Google!" />
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment