Chi saprebbe spiegarmi la formula matematica che rende possibile tutto questo???(in particolare nextcolor = nextcolor % colors.length:
</div>
<script>
var colors=["red","orange","black"];
var nextcolor = 0;
function changecolor() {
alert("P: " + nextcolor);
document.all.Warning1.style.color = colors[nextcolor++];
alert("S:" + nextcolor);
nextcolor = nextcolor % colors.length;
}
setInterval("changecolor()",1000);
</script>
</div>
<script>
var colors=["red","orange","black"];
var nextcolor = 0;
function changecolor() {
alert("P: " + nextcolor);
document.all.Warning1.style.color = colors[nextcolor++];
alert("S:" + nextcolor);
nextcolor = nextcolor % colors.length;
}
setInterval("changecolor()",1000);
</script>