Il mio codice è di una banalità disarmante:
codice:
function creaInput() {
	//creo l'elemento <input>
	input = document.createElement("input"); 

	//attacco dentro l'elemento "form foto" il child creato prima
	document.getElementById("form foto").appendChild(input);
}
Così questa funzione mi crea un <input> in un ipotetico <form>

Nella mia ignoranza vorrei arrivare a questo:

codice:
function creaInput() {
	//creo l'elemento <input>
	input = document.createElement("input"); 
        for (i = 0;i < 20;i ++)
	       //attacco dentro l'elemento "form foto" il child creato prima
	       document.getElementById("form foto").appendChild(input);
}

Mi aspetto 20 <input>, ma in realtà rimane solo uno, perchè sovrascritto...
Ma poi c'è un metodo per vedere il codice prodotto da un javascript?