Tableau

Fermé
Bella Estrella Messages postés 6 Date d'inscription mardi 16 novembre 2010 Statut Membre Dernière intervention 20 novembre 2010 - 20 nov. 2010 à 15:57
Bella Estrella Messages postés 6 Date d'inscription mardi 16 novembre 2010 Statut Membre Dernière intervention 20 novembre 2010 - 20 nov. 2010 à 16:26
Bonjour,

alors, jveux insérer des images dans un tableux, voici ce que j'ai fais:

<html>
<head><title>tp1</title></head>
<body>
<script language="javascript">
var tab1=["blouse.jpg","bottes.jpg","gants.jpg","lunettes.jpg","masque.jpg","comburant.jpg","corrosif.jpg","danger envrnmt.jpg","explosif.jpg","inflammable.jpg","irritant.jpg","nocif.jpg","toxique.jpg","pd comburant.jpg","pd toxique.jpg","pd corrosif.jpg","pd explosif.jpg","pd inflammable.jpg","pd dangereux pr envrmt.jpg","pd irritant.jpg","pd nocif.jpg"];
var indice 1= Maths.Floor(Maths.Random()*);
var indice 2= Maths.Floor(Maths.Random()*);
var indice 3= Maths.Floor(Maths.Random()*);
var indice 4= Maths.Floor(Maths.Random()*);
var indice 5= Maths.Floor(Maths.Random()*);
document.write(<img src=' "+tab1[indice 1]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 2]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 3]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 4]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 5]+" 'border='0'>";
</script>
</body>
</html>

mais quelle est l'erreur??!


5 réponses

quicksylvere Messages postés 162 Date d'inscription samedi 6 novembre 2010 Statut Membre Dernière intervention 22 octobre 2013 19
20 nov. 2010 à 16:06
moi j'ai un probleme avec tes ' et tes " ici:

document.write(<img src=' "+tab1[indice 1]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 2]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 3]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 4]+" 'border='0'>";
document.write(<img src=' "+tab1[indice 5]+" 'border='0'>";

j'aurai commencé par les " et ensuite les ' , mais j'suis pas un expert!
0
Bella Estrella Messages postés 6 Date d'inscription mardi 16 novembre 2010 Statut Membre Dernière intervention 20 novembre 2010
20 nov. 2010 à 16:10
ok, je réessaie...
0
Bella Estrella Messages postés 6 Date d'inscription mardi 16 novembre 2010 Statut Membre Dernière intervention 20 novembre 2010
20 nov. 2010 à 16:14
...rien!!!
0
quicksylvere Messages postés 162 Date d'inscription samedi 6 novembre 2010 Statut Membre Dernière intervention 22 octobre 2013 19
20 nov. 2010 à 16:21
t'as essayé comme ça?


document.write(<img src=" '+tab1[indice 5]+' border='0'>";
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Bella Estrella Messages postés 6 Date d'inscription mardi 16 novembre 2010 Statut Membre Dernière intervention 20 novembre 2010
20 nov. 2010 à 16:26
oui oui!
0