Up, come non detto.
Ci sono arrivato! Mi servirebbe un po' di vacanza.

Bisogna fare così

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