La idea esque todos los campos de mi formulario puedan convertir a mayusculas su contenido, este codigo si funciona en firefox pero en en internet explorer falla, al ver que me regresa el this.id me envia undefine. no se si me pueden ayudar gracias
Código Javascript :
// Convertir a mayusculas function mayusculas( _ID_ ){ SET( _ID_ , GEI( _ID_ ).value.toUpperCase() ); //GEI(id) es document.getElementById(id) //SET(id,valor) es GEI(id).value = valor } // Agregar eventos function addEvento(elemento,evento,funcion){ if( elemento.addEventListener ){ elemento.addEventListener(evento,funcion,false); }else if( elemento.attachEvent ){ // Para IE elemento.attachEvent ("on"+evento,funcion); } } // Agregar funcion mayusculas function addMayus(){ var inputs = TAG("INPUT"); ninputs = inputs.length; for( i = 0; i < ninputs; i++ ){ if( inputs[i].type == "text" || inputs[i].type == "password" ){ addEvento(inputs[i],"keyup",function(){ mayusculas( this.id ); }); } } }