Fredo: bewegen

Beitrag lesen

Sorry war der falsche script:

<script type="text/javascript">

var a = 0;
var b = 0;
var i = 1;
function down() {
a++;
b++;

document.getElementById("layer").style.left = a + "px";
document.getElementById("layer").style.top = b + "px";

i++;

if (i >= 200) {
window.clearInterval(moving);
}

var moving = window.setInterval("down()", 10);

}

</script>

klappt trotzdem nicht! warum?