Cita:
Iniciado por hunabku
asi tal cual como lo tengo funciona con una paguina html pero con una paguina asp.net con controles Net no es por eso mi pregunta inicial
puede que funcione 1 vez entre 1 millón
Cita: function quitaacentos(origen, destino) {
var text = document.getElementById(origen).value.toLowerCase( );
text = text.replace(/[áàäâå]/g, 'a');
text = text.replace(/[éèëê]/g, 'e');
text = text.replace(/[íìïî]/g, 'i');
text = text.replace(/[óòöô]/g, 'o');
text = text.replace(/[úùüû]/g, 'u');
text = text.replace(/[ýÿ]/g, 'y');
text = text.replace(/[ñ]/g, 'n');
text = text.replace(/[ç]/g, 'c');
text = text.replace(/['"]/g, '');
text = text.replace(/[^a-zA-Z0-9-]/g, ' ');
text = text.replace(/\s+/g, '_');
text = text.replace(/(_)$/g, '');
text = text.replace(/^(_)/g, '');
document.getElementById(destino).value = text;
return false;
}
<asp:TextBox ID="TextBox3" onChange="return quitaacentos(this.value,this.value)" runat="server"></asp:TextBox>
como te dice zerokilled, el segundo valor que le pasas a la función, es el valor del control
pd: .net no modifica el html resultante