-1
Good evening guys, I’m having a problem in javascript which is as follows:
I need to dynamically create div in a for
and put an image in these Ivs, I was able to do this with the following code:
for(y = 0;y<z;y++){
passarImagem[y] = document.createElement("div");
var testando = document.createElement("img");
testando = "<img src=exemmplo.png>";
testando.width = 500;
testando.height = 500;
passarImagem[y].innerHTML = testando.src;
}
I need to scale these images to a specific size, I put as example 500, but this way I did it does not work, I wonder if there is a way to change the size of this image.