Créer un diaporama pour mon site web.
Résolu/Fermé
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
-
22 juin 2008 à 02:19
alexou1984 Messages postés 375 Date d'inscription mardi 13 mai 2008 Statut Membre Dernière intervention 15 février 2010 - 23 juin 2008 à 03:18
alexou1984 Messages postés 375 Date d'inscription mardi 13 mai 2008 Statut Membre Dernière intervention 15 février 2010 - 23 juin 2008 à 03:18
A voir également:
- Créer un diaporama pour mon site web.
- Site de telechargement - Accueil - Outils
- Créer un compte google - Guide
- Comment créer un groupe whatsapp - Guide
- Creer un site web - Guide
- Créer un lien pour partager des photos - Guide
2 réponses
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
35
23 juin 2008 à 00:01
23 juin 2008 à 00:01
Merci pour cette info, je vais tester et je reviens vous dire si ça fonctionne.
vignemail1
Messages postés
1246
Date d'inscription
vendredi 8 octobre 2004
Statut
Contributeur
Dernière intervention
13 septembre 2019
259
22 juin 2008 à 11:31
22 juin 2008 à 11:31
Plusieurs possibilités :
En javascript, tu peux programmer une liste d'image dans une variable et changer l'attribut src de la balise img
exemple:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var array = new Array();
array.push("image1.jpg");
array.push("image2.jpg");
array.push("image3.jpg");
array.push("image4.jpg");
var indice = 0;
function changeImage(){
document.getDocumentById("image").src = array[indice];
indice=(indice+1)%array.length;
}
window.setInterval("changeImage()", 2000);
</script>
</head>
<body>
<img id="image" src="photodessinfenetregauche.jpg" alt="" height="100%" width="100%" />
</body>
</html>
Cela changera
Ou alors, tu fais que ta page centrale soit en flash si tu t'y connais. C'est plus long et plus lourd à priori.
En javascript, tu peux programmer une liste d'image dans une variable et changer l'attribut src de la balise img
exemple:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var array = new Array();
array.push("image1.jpg");
array.push("image2.jpg");
array.push("image3.jpg");
array.push("image4.jpg");
var indice = 0;
function changeImage(){
document.getDocumentById("image").src = array[indice];
indice=(indice+1)%array.length;
}
window.setInterval("changeImage()", 2000);
</script>
</head>
<body>
<img id="image" src="photodessinfenetregauche.jpg" alt="" height="100%" width="100%" />
</body>
</html>
Cela changera
Ou alors, tu fais que ta page centrale soit en flash si tu t'y connais. C'est plus long et plus lourd à priori.
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
35
23 juin 2008 à 02:57
23 juin 2008 à 02:57
Au fait, ce code, je l'intègre où ? Dans le HTML avec la FRAME ou dans le fichier HTML de base qui appelé par la page avec la FRAME ?
Do you understand ? (lol)
Je ne sais pas si je me suis fait comprendre.
Do you understand ? (lol)
Je ne sais pas si je me suis fait comprendre.
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
35
23 juin 2008 à 03:18
23 juin 2008 à 03:18
Salut,
Je viens d'essayer ton code, il ne marche pas, peut-être l'ai-je mal écrit. Le voici intégré dans ma page HTML de base avec les deux photos que j'aimerais intégrer au diaporama :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML XMLNS="http://www.w3.org/1999/xhtml">>
<HEAD>
<TITLE>
</TITLE>
<SCRIPT TYPE="text/javascript">
var array=new array();
array.push("photodessinfenetregauche.jpg");
array.push("photoreellefenetregauche.jpg");
var indice = 0;
function changeImage()
{
document.getDocumentById("image").src=array[indice];indice=(indice+1)%array.length;
}
window.setInterval("changeImage()",2000);
</SCRIPT>
</HEAD>
<BODY>
<IMG SRC="photodessinfenetregauche.jpg" alt="" height="100%" width="100%">
</BODY>
</HTML>
Je viens d'essayer ton code, il ne marche pas, peut-être l'ai-je mal écrit. Le voici intégré dans ma page HTML de base avec les deux photos que j'aimerais intégrer au diaporama :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML XMLNS="http://www.w3.org/1999/xhtml">>
<HEAD>
<TITLE>
</TITLE>
<SCRIPT TYPE="text/javascript">
var array=new array();
array.push("photodessinfenetregauche.jpg");
array.push("photoreellefenetregauche.jpg");
var indice = 0;
function changeImage()
{
document.getDocumentById("image").src=array[indice];indice=(indice+1)%array.length;
}
window.setInterval("changeImage()",2000);
</SCRIPT>
</HEAD>
<BODY>
<IMG SRC="photodessinfenetregauche.jpg" alt="" height="100%" width="100%">
</BODY>
</HTML>