Ver Mensaje Individual
  #20 (permalink)  
Antiguo 03/06/2012, 18:06
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Problema al cambiar de color un input

Cita:
function experimento()
{
var ina=document.getElementById('a').value;

if(ina=='a')
{
document.getElementById('a').style.backgroundColor = '#999999';


return false;
}
else
{
document.getElementById('a').style.backgroundColor = '#fff';
return true;
}
}
function experimento2()
{
var inb=document.getElementById('b').value;
if(inb=='a')
{
document.getElementById('b').style.backgroundColor = '#999999';
return false;
}
else
{
document.getElementById('a').style.backgroundColor = '#fff';
return true;
}
}
function prueba()
{
var retornar1 = experimento();
var retornar2 = experimento2();
return retornar1 && retornar2;
}
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}