Ver Mensaje Individual
  #10 (permalink)  
Antiguo 15/11/2005, 07:15
Avatar de Saruman
Saruman
 
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 21 años
Puntos: 5
Cita:
Iniciado por caricatos
Fíjate en estas pocas líneas:

window["mi variable"] = "soy yo";
alert(window["mi variable"]);
var mi_variable = "...y yo";
alert(window["mi_variable"]);

Si se declara una variable con var se crea un objeto/atributo que cuelga de window, y tanto puedes referenciar ese objeto por su nombre, o como un atributo de window (window.mi_variable o window["mi_variable"])
interesante esto que planteas... no lo conocia....
la verdad que es interesante

saludos
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.