měl jsem to řešeno takto:
Kód: Vybrat vše
<script type="text/javascript">
var x=Math.ceil(Math.random()*16);
if (x==0){i='<img src="foto_farnosti/andelka4s_t.jpg" alt="obr"/>'};
if (x==1){i='<img src="foto_farnosti/arnoltice2s_t.jpg" alt="obr"/>'};
if (x==2){i='<img src="foto_farnosti/bulovka1s_t.jpg" alt="obr"/>'};
if (x==3){i='<img src="foto_farnosti/cernousy3s_t.jpg" alt="obr"/>'};
if (x==4){i='<img src="foto_farnosti/dolni_oldriss_t.jpg" alt="obr"/>'};
if (x==5){i='<img src="foto_farnosti/detrichov4s_t.jpg" alt="obr"/>'};
if (x==6){i='<img src="foto_farnosti/frydlant3s_t.jpg" alt="obr"/>'};
if (x==7){i='<img src="foto_farnosti/frydlant5s_t.jpg" alt="obr"/>'};
if (x==8){i='<img src="foto_farnosti/frydlant12s_t.jpg" alt="obr"/>'};
if (x==9){i='<img src="foto_farnosti/habartice1s_t.jpg" alt="obr"/>'};
if (x==10){i='<img src="foto_farnosti/kunratice1s_t.jpg" alt="obr"/>'};
if (x==11){i='<img src="foto_farnosti/pertoltice1s_t.jpg" alt="obr"/>'};
if (x==12){i='<img src="foto_farnosti/ves2s_t.jpg" alt="obr"/>'};
if (x==13){i='<img src="foto_farnosti/visnova8s_t.jpg" alt="obr"/>'};
if (x>13){i='<img src="foto_farnosti/frydlant12s_t.jpg" alt="obr"/>'};
</script>
<script type="text/javascript">
document.write(i);
</script>
můžete mi poradit jak jinak to zapsat?moc děkuji

