Código:
<script>
var tFormFieldCount = 1;
function MakeTextInput() {
document.getElementById('autor').innerHTML += 'Campo' + tFormFieldCount + ' ' +'<input type="text" name="Campo' + tFormFieldCount + '"><br><br>';
tFormFieldCount++;
}
</script>
y luego
Código HTML:
<form action="" method="post"> <div id="autor"></div> <input type="button" value="Agregar Campo" onClick="MakeTextInput();"> </form>
Ayuda, por favor.




Este tema le ha gustado a 2 personas