Ciao, vorrei sapere se il seguente codice carica correttamente l'immagine, grazie!
function resizeGame() {
var imageObj = new Image();
imageObj.onload = function () {
var sty3 = "content:url(1.jpg); width:100%; position:relative; z-index:-100;"
var obj2 = document.getElementById("sfondo");
obj2.setAttribute("style", sty3);
};
imageObj.src = '1.jpg';
}
Francesco