Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/05/2008, 12:01
sciutomaxi
 
Fecha de Ingreso: junio-2007
Mensajes: 152
Antigüedad: 17 años, 9 meses
Puntos: 0
Agregar en un input type file un onchange con DOM

Gente al hacer click en un boton hago lo siguiente agrego un boton de tipo file lo que no puedo hacer es darle un onclik o un onchange todo lo demas lo hace bien como decirle de que type es su nombre y id

Código HTML:
 ele = document.createElement('input'); // creo un input
 ele.type = 'file';
 ele.onchange='unafuncion()';//este no me lo agrega
 ele.name = 'foto';
 ele.id = 'foto6'
//despues lo agrego al boton
como hago para ponerle evento a un boton como un onclick o onchange