szinhazjegyek/script.js
2022-12-14 11:16:40 +01:00

26 lines
1007 B
JavaScript

hely = new Array()
for(i = 1; i <= 15; i++)
{
if(i == 1) document.write("<span class='helyar'>7500.- Ft</span>")
if(i == 6) document.write("<span class='helyar'>5900.- Ft</span>")
if(i == 11) document.write("<span class='helyar'>4500.- Ft</span>")
hely[i] = new Array()
document.write("<span class='sorszam'>" + i + ".</span>")
for(j = 1; j <= 24; j++)
{
hely[i][j] = Math.floor((1 - Math.random() * Math.random()) * 2)
if(hely[i][j] == 1)
{
document.write("<span class='szek foglalt' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
}
else
{
document.write("<span class='szek szabad' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
}
}
document.write("<br>")
if(i % 5 == 0) document.write("<hr size=1 color=#880000>")
}