Bonjour,
Je souhaiterais faire un petit formulaire de recherche avec option ( Google / Yahoo / Bing ).
Ce code est idéal, mais il manque des éléments pour qu'il fonctionne.
Il s'agit seulement de se retrouver sur l'un des trois moteurs de recherche choisi par une option (radio), avec le mot clé inséré.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 <script type="text/javascript"> <!-- function goSearch(){ //search according to checked radio button } tab = new Array( ) ; tab[0] = new Array( 'google','http://www.google.com/search','get','q' ) ; tab[1] = new Array( 'yahoo','http://fr.search.yahoo.com/search','get','p' ) ; tab[2] = new Array( 'bing','http://www.bing.com/search','get','p' ) ; --> </script> <h1>Recherche Internet</h1><br /> <form method="get" action="goSearch()"> <input type="text" name="q" size="25" maxlength="255" value="" /> <br /><br /> <input type="radio" name="search" id="google"/>GOOGLE <input type="radio" name="search" id="yahoo"/>YAHOO <input type="radio" name="search" id="bing" />BING <br /><br /> <input type="submit" value="RECHERCHE" /> </form>
Je vous remercie par avance de votre précieuse aide.
Cordialement.
Partager