| <head>
<script language="Javascript">
 var pages=new Array;
 var mots=new Array;
 var titres=new Array;
 
 pages[0]="antivirus.html";
 tires[0]="Antivirus";
 mots[0]="antivirus,norton,mcafee,viruscan,panda,kaspersky,spywares,spyware,trojan,troyen,anti-spywares,virus,boot,application";
 pages[1]="baseshtml.html";
 titres[1]="Les bases HTML";
 mots[1]="HTML,bases,code,script,apprendre,image,font,face,color,couleur,police,écriture,gras,italique,marquee,souligné";
 
 function cherche()
 {
 var n=mots.lenght;
 var indice=-1;
 var txt=document.requete.motcle.value
 var trouve=0
 
 if (txt=="" )
 {
 alert("Entrez un mot dans le champ de recherche pour qu'Aidoweb puisse satisfaire votre requête" );
 trouve=1;
 }
 
 else
 {
 document.write("<form><input type=button onClick='history.go(-1)'" );
 document.write("value='Nouvelle recherche'></form>" );
 document.write("<hr>" )
 document.write(<b>Résultat de la recherche sur</b> "+" <i>"+txt+"</i><br>" );
 for (i=0; i<n; i++)
 {
 if
 (mots[i].toUpperCase().indexOf(txt.toUpperCase(),0)!="-1" )
 {
 trouve=1;
 indice=i
 document.write("a href='"pages[indice]+"'>" );
 document.write(titres[indice]+"</a>"+"<br>" );
 }
 }
 }
 
 if (trouve==0)
 {
 document.write("Aucune page sur Aidoweb ne correspond à ce mot clé" );
 }
 }
 </script>
 </head>
 
 
 Et dans le corps :
 <body>
 <center><form name="requete">
 <b>Chercher sur Aidoweb</b><br>
 <input name="motcle" size=35><br>
 <input type="button" value="Chercher" onClick="cherche()">
 </form></center>
 </body>
 |