Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/01/2012, 14:41
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Búsqueda por etiqueta name y expresión regular

me has tenido loca con la expresión, hasta que me he dado cuenta de
Cita:
document.getElementsByName[/_porcentaje\b/];
<input type="text" name="AADD_1_portentaje" value="prueba1" />


prueba así
Cita:
function fnc() {
var inputs = document.body.getElementsByTagName('input');

for(var i = 0; i < inputs.length; i++) {
nom_atributo = inputs[i].name;
var patron=/_porcentaje$/;
if(patron.test(nom_atributo)) alert(inputs[i].value);
}
}
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}