Fredo: bewegen

Beitrag lesen

Quelltext:

</style>
<script type="text/javascript">
var a = 0;
var b = 0;
var i = 1;
function down() {
a++;
b++;

document.getElementsByTagName("img").style.left = a + "px";
document.getElementsByTagName("img").style.top = b + "px";

i++;

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

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

}

</script>

Fehlermeldung:

Fehler: document.getElementsByTagName("img").style has no        properties
Zeile: 14

so natürlich