If you replace the innerHTML, the previously entered values will be cleared, to avoid that, you can append the input elements programmatically:
var input = document.createElement('input');
input.type = "text";
//...
container.appendChild(input);
Check this example.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…