Hallo, ich habe ein Problem, ich wollte daß der Hintergrund seine Bilder automatisch nach zufall ändert, dadurch habe ich nach gesehe und ein scriptbeispiel versucht zu ändern, aberam anfang hat er gar nichts gemacht, und mit dem code unten wechselt er gerade mal 3 bilder und zwischen drin nichts mehr, was ist d falsch?
Danke für alle dir helfen!!!
Danke für alle dir helfen!!!
<script>
var backgr1="../data/pichint/hint01.jpg"
var backgr2="../data/pichint/hint02.jpg"
var backgr3="../data/pichint/hint03.jpg"
var backgr4="../data/pichint/hint04.jpg"
var backgr5="../data/pichint/hint05.jpg"
var backgr6="../data/pichint/hint06.jpg"
var backgr7="../data/pichint/hint07.jpg"
var backgr8="../data/pichint/hint08.jpg"
var backgr9="../data/pichint/hint09.jpg"
var backgr10="../data/pichint/hint10.jpg"
var backgr11="../data/pichint/hint11.jpg"
var backgr12="../data/pichint/hint12.jpg"
var backgr13="../data/pichint/hint13.jpg"
var backgr14="../data/pichint/hint14.jpg"
var backgr15="../data/pichint/hint15.jpg"
var backgr16="../data/pichint/hint16.jpg"
var backgr17="../data/pichint/hint17.jpg"
var backgr18="../data/pichint/hint18.jpg"
var backgr19="../data/pichint/hint19.jpg"
var backgr20="../data/pichint/hint20.jpg"
var backgr21="../data/pichint/hint21.jpg"
var backgr22="../data/pichint/hint22.jpg"
var cur=Math.round(6*Math.random())
if (cur<=1) backgr=backgr1
else if (cur<=1)backgr=backgr2
else if (cur<=1)backgr=backgr3
else if (cur<=1)backgr=backgr4
else if (cur<=1)backgr=backgr5
else if (cur<=1)backgr=backgr6
else if (cur<=1)backgr=backgr7
else if (cur<=1)backgr=backgr8
else if (cur<=1)backgr=backgr9
else if (cur<=1)backgr=backgr10
else if (cur<=1)backgr=backgr11
else if (cur<=1)backgr=backgr12
else if (cur<=1)backgr=backgr13
else if (cur<=1)backgr=backgr14
else if (cur<=1)backgr=backgr15
else if (cur<=1)backgr=backgr16
else if (cur<=1)backgr=backgr17
else if (cur<=1)backgr=backgr18
else if (cur<=1)backgr=backgr19
else if (cur<=1)backgr=backgr20
else if (cur<=1)backgr=backgr21
else backgr=backgr22
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>
var backgr1="../data/pichint/hint01.jpg"
var backgr2="../data/pichint/hint02.jpg"
var backgr3="../data/pichint/hint03.jpg"
var backgr4="../data/pichint/hint04.jpg"
var backgr5="../data/pichint/hint05.jpg"
var backgr6="../data/pichint/hint06.jpg"
var backgr7="../data/pichint/hint07.jpg"
var backgr8="../data/pichint/hint08.jpg"
var backgr9="../data/pichint/hint09.jpg"
var backgr10="../data/pichint/hint10.jpg"
var backgr11="../data/pichint/hint11.jpg"
var backgr12="../data/pichint/hint12.jpg"
var backgr13="../data/pichint/hint13.jpg"
var backgr14="../data/pichint/hint14.jpg"
var backgr15="../data/pichint/hint15.jpg"
var backgr16="../data/pichint/hint16.jpg"
var backgr17="../data/pichint/hint17.jpg"
var backgr18="../data/pichint/hint18.jpg"
var backgr19="../data/pichint/hint19.jpg"
var backgr20="../data/pichint/hint20.jpg"
var backgr21="../data/pichint/hint21.jpg"
var backgr22="../data/pichint/hint22.jpg"
var cur=Math.round(6*Math.random())
if (cur<=1) backgr=backgr1
else if (cur<=1)backgr=backgr2
else if (cur<=1)backgr=backgr3
else if (cur<=1)backgr=backgr4
else if (cur<=1)backgr=backgr5
else if (cur<=1)backgr=backgr6
else if (cur<=1)backgr=backgr7
else if (cur<=1)backgr=backgr8
else if (cur<=1)backgr=backgr9
else if (cur<=1)backgr=backgr10
else if (cur<=1)backgr=backgr11
else if (cur<=1)backgr=backgr12
else if (cur<=1)backgr=backgr13
else if (cur<=1)backgr=backgr14
else if (cur<=1)backgr=backgr15
else if (cur<=1)backgr=backgr16
else if (cur<=1)backgr=backgr17
else if (cur<=1)backgr=backgr18
else if (cur<=1)backgr=backgr19
else if (cur<=1)backgr=backgr20
else if (cur<=1)backgr=backgr21
else backgr=backgr22
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>
Kommentar