Trucsweb.com
Forum de discussion
Forum « Programmation Javascript » (archives)
javascript target='_blank'
Envoyé: 14 octobre 2005, 6h59 par winx
J’ai un script de liens que j’aimerais faire ouvrir dans une nouvelle page comment je peut faire je ne comprends rien a java script merci.
<script language="JavaScript" >
var a = Math.random() + ""
var nombre = a.charAt(5)
script = new Array;
script[1] = "<a href='
http://www.lien 1'>texte 1</a>"
script[2] = "<a href='
http://www.lien 2'>texte 2</a>"
script[3] = "<a href='
http://www.lien 3'>texte 3</a>"
script[4] = "<a href='
http://www.lien 4'>texte 4</a>"
script[5] = "<a href='
http://www.lien 5'>texte 5</a>"
script[6] = "<a href='
http://www.lien 6'>texte 6</a>"
script[7] = "<a href='
http://www.lien 7'>texte 7</a>"
script[8] = "<a href='
http://www.lien 8'>texte 8</a>"
script[9] = "<a href='
http://www.lien 9'>texte 9</a>"
script[0] = "<a href='
http://www.lien 0'>texte 0</a>"
var nouveau = script[nombre]
document.write(nouveau);
</script>
Réponses
Aucune réponse à ce message... |
|
X Connexion
X Mot de passe perdu
X Conditions générales
Conditions
X Trucsweb
X Glossaire
X Trucsweb
X Trucsweb
Conditions
X Créer un compte