I am trying to create a basic game with ledges you jump on, its always something i wanted to figure out. But my question is, I am using a innerHTML tag to insert a new image every few seconds, but when I do it breakes <br>
by itself. How do you add a new image in a innerHTML tag without breaking?
function landT() {
document.getElementById("land01").innerHTML += "<pre><img src =\'images/platform00.png\'></pre>";
moveMYP();
}
function moveMYP() {
var thisTimer = setTimeout(moveMYP, 500);
moveBlock1 = moveBlock1 - 10;
document.getElementById("land00").style.left = moveBlock1 + "px";
}