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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| <script language="JavaScript">
var nbSearch=0;
function findInPage(str) {
var txt, i, found;
if (str=="") return false;
if ((document.layers)||(window.sidebar)) {
if (!window.find(str)) {
alert("Fin de page atteinte.\n"+'"'+str+'" trouvé '+nbSearch+" fois.");
while(window.find(str, false, true)) {nbSearch++;}
}
else
nbSearch++;
if (nbSearch == 0)
alert('"'+str+'" est introuvable');
}
if (document.all) {
txt = window.document.body.createTextRange();
for (i = 0; i <= nbSearch && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
nbSearch++;
} else {
if (nbSearch > 0) {
alert("Fin de page atteinte.\n"+'"'+str+'" trouvé '+nbSearch+" fois.");
nbSearch = 0;
findInPage(str);
} else {
alert('"'+str+'" est introuvable');
}
}
}
return false;
}
</script>
<form name="search" onSubmit="return findInPage(this.motcle.value);">
<p style="margin-top: 0; margin-bottom: 0">
<input name="motcle" type="text" size=30 onFocus="nbSearch=0; if (this.value=='Mot-clé') {this.value=''}" value="Rechercher" style="color: #6B4A8C; border: 2px solid #6B4A8C; background-color: #EBEBEB; font-family:Times New Roman; font-weight:bold; font-size:12pt; padding-left:2px; padding-right:0px; padding-top:1px; padding-bottom:1px">
<input type="submit" value="OK" style="color: #EBEBEB; font-family: Times New Roman; font-size: 12pt; font-weight: bold; border-style: solid; border-width: 0px; background-color: #6B4A8C"></p>
</form> |
Partager