Aller au contenu

Script d'image


baddark

Sujets conseillés

Bonjour,

J'aimerais corriger mon script, je ne comprend pas comment le compléter (ne connaissant pas trop les variables :s)

Je voudrais que selon l'image choisis via mon script (en cliquant sur le nom), celle-ci apparaitra dans la page index de mon site (dans la news) recuperer par une variable $pseudo mais je ne sais point le faire :s pouvez-vous me dire comment faire svp?

Mon script :

<html>
<head>
<title>TEST</title>
</head>
<body>

<script language="javascript">

function afficher(theid)
{
if (document.getElementById(theid).style.display=="inline")
{
document.getElementById(theid).style.display = "none";
}
else
{
document.getElementById(theid).style.display = "inline";
}

}
</script>
<script type="text/javascript" language="JavaScript">

<!--

if (document.images) {
images0 = new Image
images1 = new Image
images2 = new Image
images3 = new Image
images4 = new Image

images0.src = "http://rooxy-team.com/bann/Rooxy.bmp"
images1.src = "http://rooxy-team.com/bann/Latnel.bmp"
images2.src = "http://rooxy-team.com/bann/Baddark.bmp"
images3.src = "http://rooxy-team.com/bann/Aliosha.bmp"
images4.src = "http://rooxy-team.com/bann/Amelfik.bmp"

}
-->
</script>
<center>
<b>News poster par :</b><br><br>
<img src="http://rooxy-team.com/bann/Rooxy.bmp" style=" margin-right:2px;" alt="" name="imagesname" width="100" height="100" id="imagesname" />
<br />
<br />

<div id="img0" style="display: none"><img src='http://rooxy-team.com/bann/Rooxy.bmp'/></div>
<div id="img1" style="display: none"><img src='http://rooxy-team.com/bann/Latnel.bmp'/></div>
<div id="img2" style="display: none"><img src='http://rooxy-team.com/bann/Baddark.bmp'/></div>
<div id="img3" style="display: none"><img src='http://rooxy-team.com/bann/Amelfik.bmp'/></div>
<div id="img4" style="display: none"><img src='http://rooxy-team.com/bann/Aliosha.bmp'/></div>

<u><a onclick="document.imagesname.src=images1.src">Latnel</a></u>
<u><a onClick="document.imagesname.src=images2.src">Baddark</a></u>
<u><a onClick="document.imagesname.src=images0.src">Rooxy</a></u>
<u><a onClick="document.imagesname.src=images4.src">Amelfik</a></u>
<u><a onClick="document.imagesname.src=images3.src">Aliosha</a></u>

</center>

</body>
</html>

Modifié par Arlette
Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...