Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
4134 connectés 

 


Dernière réponse
Sujet : 2 scripts que je ne retrouve plus
Musaran Tu peux virer ton topic toi-même en éditant ton premier post !

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
Musaran Tu peux virer ton topic toi-même en éditant ton premier post !
Movez LanG oui en effet j'y ai pensé mais j'ai vraiment cru que ce serait effacé aussitôt , et tu sais tu pourrais te modérer dans tes propos " ce serait la moindre des politesses" ????
tu me diras pk, t'aurais je fais chier avec ma question au point que pr me faire pardonner, je suis obligé d'avoir la réponse...
 
donc voilà comment j'ai fais ::
pour les favoris  
<img src="mail.gif" width="24" height="24" border="0">  pr l'icône des favoris
   
 
et voilà le script en dessous ::
<script language="JavaScript">
/* Find In Page Script- By Mike Hall (MHall75819@aol.com) */
var NS4 = (document.layers);    // Which browser?
var IE4 = (document.all);
var win = window;    // window to search.
var n   = 0;
function findInPage(str) {
var txt, i, found;
if (str == "" )
return false;
// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.
if (NS4) {
// Look for match starting at the current point. If not found, rewind
// back to the first match.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
// If not found in either direction, give message.
if (n == 0)
alert("Not found." );
}
if (IE4) {
txt = win.document.body.createTextRange();
// Find the nth match from the top of the page.
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit" );
}
// If found, mark it and scroll it into view.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
  n++;
  }
// Otherwise, start over at the top of the page and find first match.
 
else {
if (n > 0) {
n = 0;
findInPage(str);
}
// Not found anywhere, give message.
else
alert("Not found." );
}
}
return false;
}
</script>

 
et pour le form //le moteur de recherche
 
<form name="search" onSubmit="return findInPage(this.string.value);">
<input name="string" type="text" size=20 onChange="n = 0;">
<input type="submit" value="Ok">
</form></td>

 
avec le script  
<script language="JavaScript">
/* Find In Page Script- By Mike Hall (MHall75819@aol.com) */
var NS4 = (document.layers);    // Which browser?
var IE4 = (document.all);
var win = window;    // window to search.
var n   = 0;
function findInPage(str) {
var txt, i, found;
if (str == "" )
return false;
// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.
if (NS4) {
// Look for match starting at the current point. If not found, rewind
// back to the first match.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
// If not found in either direction, give message.
if (n == 0)
alert("Not found." );
}
if (IE4) {
txt = win.document.body.createTextRange();
// Find the nth match from the top of the page.
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit" );
}
// If found, mark it and scroll it into view.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
  n++;
  }
// Otherwise, start over at the top of the page and find first match.
 
else {
if (n > 0) {
n = 0;
findInPage(str);
}
// Not found anywhere, give message.
else
alert("Not found." );
}
}
return false;
}
</script>

 
 
 
voilà voilou, je sais pas si ça claque , mais en tout cas ça marche  :hello:
jultey si tu pouvais dire aussi la solution de ton problème, ca serait la moindre des politesses...
Movez LanG désolé, j'ai trouvé la solution à mes deux questions
pourtant je cherchais depuis un temps !!
les modos, si vous pouvez nettoyer mon topic, merci
Movez LanG désolé l'ajout en favoris j'ai fais
mais le moteur de recherche ??
Movez LanG comme je ne sais pas programmer en html
je me sert des script déjà éditer sur le ouaib et mis à notre dispo, il y a en a certain que j'avais déjà trouvé mais que maintenant je ne retrouve plus....
 
qq1 pourrait il me dire comment je fais pour proposer mon site en favoris mais via une petite icônes Favoris, et comment incoporés un petit moteur de recherche sur une page, un genre Ctrl + F
 
merci à tous, en espérant ne pas avoir poster un peu trop tard

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)