0

When I say Google search, I don't mean a search bar just for my website, I want it to be so it has a search bar and if they write something in there it search's it on Google?

Something like this:

<form method="get" action="http://www.google.com/search">

Would I use just css and html for this? or could I use JavaScript or something to make it better and less plain?

user2465543
  • 81
  • 1
  • 1
  • 2

2 Answers2

1

This should work:

<form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
  <input type="hidden" name="cref" value="" />
  <input type="hidden" name="ie" value="utf-8" />
  <input type="hidden" name="hl" value="" />
  <input name="q" type="text" size="40" />
  <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang="></script>
dunnmifflsys
  • 613
  • 2
  • 9
  • 21
0

type google custom search in Google. It has all the steps to embed Google search in your website :)

Jay
  • 3,353
  • 5
  • 25
  • 34