Rando Lotto
by hellosze
HTML
<div id="lottery1" class="lotto"></div>
<div id="lottery2" class="lotto"></div>
<div id="lottery3" class="lotto"></div>
<div id="lottery4" class="lotto"></div>
<div id="lottery5" class="lotto"></div>
<div id="lottery6" class="lotto"></div>
CSS
.lotto {
border-radius: 25px;
background: #6EA3FF;
color: #fff;
width: 16px;
padding: 12px;
border: solid #ccc 1px;
text-align: center;
font-family: arial;
}
JavaScript
count = 1;
function roll(){
r = Math.floor(Math.random()*56)+1;
$("#lottery"+count).html(r);
}
while( count < 7 ){
roll();
count++;
}