21/06/2017, 12:37
|
|
Respuesta: Formulario que oculte o muestre diferentes campos a puro if
if(opc == 1){
elemento1.style.display = "block";
elemento2.style.display = "none";
elemento3.style.display = "none";
elemento4.style.display = "none";
etc...
}
else if(opc == 2){
elemento2.style.display = "block";
elemento1.style.display = "none";
elemento3.style.display = "none";
elemento4.style.display = "none";
etc..
}
else if(opc == 3){
elemento3.style.display = "block";
elemento1.style.display = "none";
elemento2.style.display = "none";
elemento4.style.display = "none";
etc..
}
y así.... |