Description

Salut:
Donne apres 15sec 7 chiffres au hasard
le site origine : http://www.espacejavascript.com/jeux_1.php
j'ai modifie le code parce que a l'origine il ne donne que 5 chiffres ( entre 1 et 21
jeux du lote avec les jetons )
voila..... bon loto

Source / Exemple :


<html>

<head>
<LINK href="file:///C:/postit_fichiers/menu.css" type=text/css rel=StyleSheet>
<SCRIPT language=Javascript src="postit.js"></SCRIPT>
</HEAD>
<BODY bottomMargin=0 leftMargin=0 topMargin=0 
onload="postit(-5,20,'ATTENTION:<br>j\'ai modifié le script<br>d\'origine<br>www.<br>espacejavascript.com<br>/jeux_1.php<br>!!<br><br><small>(Cliquer sur la <br>punaise pour fermer)</small>')" 
rightMargin=0 MarginHeight="0" MarginWidth="0">
</BODY>
</HTML>

<script language="javascript">
/*
JAVASCRIPT CREE PAR
OORTOUNGORF - ESPACE JAVASCRIPT.COM
http://www.espacejavascript.com

  • /
function tirage() { document.prono.pr1.style.color = '#ffffff'; document.prono.pr2.style.color = '#ffffff'; document.prono.pr3.style.color = '#ffffff'; document.prono.pr4.style.color = '#ffffff'; document.prono.pr5.style.color = '#ffffff'; document.prono.pr6.style.color = '#ffffff'; document.prono.pr7.style.color = '#ffffff'; nbre = 49; n1 = 1+Math.floor(Math.random()*nbre); n2 = 1+Math.floor(Math.random()*nbre); n3 = 1+Math.floor(Math.random()*nbre); n4 = 1+Math.floor(Math.random()*nbre); n5 = 1+Math.floor(Math.random()*nbre); n6 = 1+Math.floor(Math.random()*nbre); n7 = 1+Math.floor(Math.random()*nbre); if((n1 == n2)||(n1 == n3)||(n1 == n4)||(n1 == n5)||(n1 == n6)||(n1 == n7)||(n2 == n1)||(n2 == n3)||(n2 == n4)||(n2 == n5)||(n2 == n6)||(n2 == n7)||(n3 == n1)||(n3 == n2)||(n3 == n4)||(n3 == n5)||(n3 == n6)||(n3 == n7)||(n4 == n1)||(n4 == n2)||(n4 == n3)||(n4 == n5)||(n4 == n6)||(n4 == n7)||(n5 == n1)||(n5 == n2)||(n5 == n3)||(n5 == n4)||(n5 == n6)||(n5 == n7)||(n6 == n1)||(n6 == n2)||(n6 == n3)||(n6 == n4)||(n6 == n5)||(n6 == n7)||(n7 == n1)||(n7 == n2)||(n7 == n3)||(n7 == n4)||(n6 == n5)||(n6 == n7)) { tirage(); } else { with(document) { getElementById("loto1").innerText = n1; getElementById("loto2").innerText = n2; getElementById("loto3").innerText = n3; getElementById("loto4").innerText = n4; getElementById("loto5").innerText = n5; getElementById("loto6").innerText = n6; getElementById("loto7").innerText = n7; } } } function resultats() { var i = 0; with(document.prono) { p1 = pr1.value; p2 = pr2.value; p3 = pr3.value; p4 = pr4.value; p5 = pr5.value; p6 = pr6.value; p7 = pr7.value; } if((p1 == n1)||(p1 == n2)||(p1 == n3)||(p1 == n4)||(p1 == n5)) { document.prono.pr1.style.color = '#ff8000'; i++; } if((p2 == n1)||(p2 == n2)||(p2 == n3)||(p2 == n4)||(p2 == n5)) { document.prono.pr2.style.color = '#ff8000'; i++; } if((p3 == n1)||(p3 == n2)||(p3 == n3)||(p3 == n4)||(p3 == n5)) { document.prono.pr3.style.color = '#ff8000'; i++; } if((p4 == n1)||(p4 == n2)||(p4 == n3)||(p4 == n4)||(p4 == n5)) { document.prono.pr4.style.color = '#ff8000'; i++; } if((p5 == n1)||(p5 == n2)||(p5 == n3)||(p5 == n4)||(p5 == n5)) { document.prono.pr5.style.color = '#ff8000'; i++; } if((p6 == n1)||(p6 == n2)||(p6 == n3)||(p6 == n4)||(p6 == n5)) { document.prono.pr6.style.color = '#ff8000'; i++; } if((p7 == n1)||(p7 == n2)||(p7 == n3)||(p7 == n4)||(p7 == n5)) { document.prono.pr7.style.color = '#ff8000'; i++; } if(i == 0) { document.getElementById("resultats").innerText = ''; return(false); } if(i == 1) { document.getElementById("resultats").innerText = 'Vous avez 1 bon numéro !'; return(false); } if((i < 5)&&(i > 1)) { document.getElementById("resultats").innerText = 'Vous avez '+i+' bons numéros !'; return(false); } if(i == 5) { document.getElementById("resultats").innerText = 'Vous avez 5 bons numéros !'; return(false); } } function loto() { document.getElementById("resultats").innerText = 'Choisissez 5 numéros entre 1 et 21...'; document.prono.reset(); document.prono.pr1.style.color = '#ffffff'; document.prono.pr2.style.color = '#ffffff'; document.prono.pr3.style.color = '#ffffff'; document.prono.pr4.style.color = '#ffffff'; document.prono.pr5.style.color = '#ffffff'; document.prono.pr6.style.color = '#ffffff'; document.prono.pr7.style.color = '#ffffff'; } </script> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Loto Flash.....par FKP95!!!!!!</title> </head> <body bgcolor="#0061AD"> <table cellpadding=0 cellspacing=0> <tr> <td background="fond_loto.gif" width=320 height=200 align="center" bgcolor="#0061AD"> <br><br> <form name="prono"> <input name="pr1" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr2" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr3" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr4" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr5" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr6" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="prx" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <input type="text" name="pr7" size="1" maxlength=2 STYLE="align-text:center;color:#0061AD;border:none; background:#0061AD;font-family:verdana;font-weight:bold;font-size:11"> <br> <br> </form> <DIV ID="resultats" STYLE="color:#ffffff;font-family:verdana;font-size:10;font-weight:bold;position:relative;visibility:visible"> &nbsp;</DIV> <img border="0" src="logo_loto.gif" width="144" height="47"><table cellpadding=0 cellspacing=1 bgcolor="#004080"> <tr> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto1" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto2" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto3" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto4" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto5" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto6" STYLE="position:relative"></DIV> </td> <td width=20 height=20 bgcolor="#0061AD" STYLE="padding:4" align="center" valign="center"> <font color="#00ff00" face="verdana" size=1><b> <DIV ID="loto7" STYLE="position:relative"></DIV> </td> </tr> </table> <br> <input type="button" onclick="affichage=window.setInterval('tirage()', 100);window.setTimeout('clearInterval(affichage);resultats()', 15000)" value=" La Baraca!!!! " STYLE="color:#ffffff;border:1px double #ffffff; background:#4890c0;font-family:verdana;font-weight:bold;font-size:10"> <input type="button" onclick="loto()" STYLE="color:#ffffff;border:1px double #0061AD; background:#0061AD;font-family:verdana;font-weight:bold;font-size:10"> </td></tr></table> </body> </html>

Conclusion :


aucune

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.