Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/04/2013, 16:41
marcelocuiza_de
 
Fecha de Ingreso: abril-2013
Mensajes: 60
Antigüedad: 11 años, 1 mes
Puntos: 2
javascript onchange

salu2.

necesito obtener el id del un elemento que activo a una funcion.. eje.
formulario:

<form id="frm">
<input type="text" id="uno" />
<input type="text" id="dos" />
<input type="text" id="tres" />
<input type="text" id="cuatro" />
<input type="text" id="cinco" />
</form>

javascript:

<script>
this.onchange = prueba;

function prueba(id)
{
// q me diga que elemento del formulario llamo a esta funcion;
}
</script>

es un script generico, por lo tanto ninguna elemento tendra un onchange="". es decir: <input type="text" id="cinco" onchange="prueba(this.id)"/>

me dejo entender? ayuda porfa..