Ecco anche il codice

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head>

<script type="text/javascript">
<!--

var arrInput = new Array(0);
var arrInputValue = new Array(0);

function addInput() {
//arrInput.push(createInput(arrInput.length));
arrInput.push(arrInput.length);
//arrInputValue.push(arrInputValue.length);
arrInputValue.push("");
display();
}

function display() {
document.getElementById('parah').innerHTML="";
for (intI=0;intI<arrInput.length;intI++) {
document.getElementById('parah').innerHTML+=create Input(arrInput[intI], arrInputValue[intI]);
}
}

function saveValue(intId,strValue) {
arrInputValue[intId]=strValue;
}

function createInput(id,value) {
return "<input type='text' id='test "+ id +"' onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'>
";
}

function deleteInput() {
if (arrInput.length > 0) {
arrInput.pop();
arrInputValue.pop();
}
display();
}
// -->
</script>


</head>
<body >



<div align="center">

<form method="POST" action="post.php">
<p id="parah"></p>

Aggiungi un campo al modulo

Rimuovi un campo dal modulo
<input type="submit" value="Invia" name="B1">
</form>


</div>



</body>
</html>