Ver Mensaje Individual
  #14 (permalink)  
Antiguo 14/10/2010, 02:51
Avatar de Naguissa
Naguissa
 
Fecha de Ingreso: junio-2008
Mensajes: 37
Antigüedad: 15 años, 11 meses
Puntos: 2
Respuesta: script no funciona :(

Puedes usar IDs combinadas con números y hacer:

Código Javascript:
Ver original
  1. function selecciona(id) {
  2.   var o;
  3.   for (var i=0; i<MAXIMA_ID; i++) {
  4.     o = document.getElementById("prefijoElemento" + i);
  5.     if (typeof o != 'undefined') {
  6.       o.style.display = (i == id ? 'block' : 'none');
  7.     }
  8.   }
  9. }