lundi 2 mars 2015

Google Search integration in HTML form?

I have a HTML form as search bar on my site like that:



<li class="menubox">
<form class="search" id="search" method="get" target="_blank" action="">
<fieldset>
<input type="text" name="" id="suchbegriff" />
<button type="submit" name="">Suchen</button>
</fieldset>
</form>
</li>


Now I want to integrate the Google Search function without using their design setup.



<script>
(function() {
var cx = '001707752910213856904:e8hcbtzeevm';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>


Is it possible to bring both together, so I could have 100% control about the design through my CSS?


With other words, do exists somewhere an action link, input field name and submit field name for the Google Search or there are other ways to combine the code?


Aucun commentaire:

Enregistrer un commentaire