Ver Mensaje Individual
  #13 (permalink)  
Antiguo 22/08/2002, 19:08
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535
Re: ¿Como ejecuto código que esta en una variable?

'ta madre... si hubieses aclarado que estabas usando jscript, la cosa era otra ;)

Cita:
Description: Evaluates JScript code.

Syntax: eval(codestring)

The codestring argument is a String object that contains valid JScript code. This string is parsed by the JScript parser and executed.

Remarks: The eval function allows dynamic execution of JScript source code. For example, the following code creates a new variable mydate that contains a Date object:

eval("var mydate = new Date();");The code passed to the eval method is executed in the same context as the call to the eval method.
tarde, pero seguro <img src='images/tongue.gif' width=15 height=15 align=middle>

saludos