Ver Mensaje Individual
  #11 (permalink)  
Antiguo 27/02/2009, 10:08
Avatar de SPAWN3000
SPAWN3000
 
Fecha de Ingreso: marzo-2008
Ubicación: Bogota
Mensajes: 858
Antigüedad: 16 años, 2 meses
Puntos: 15
Respuesta: Funcion autoejecutable y recursiva

Cita:
Iniciado por jeybi Ver Mensaje
Dices algo como... esto?
Código javascript:
Ver original
  1. var AJX = {
  2.     Efx:function(idx,x,y,w,h){
  3.         fn = function(i){
  4.             alert('me ejecuto sola...:'+i);i++;
  5.             if(i<=3)arguments.callee(i); //esto no funciona..no lo hace hasta que i==3
  6.             }(idx);
  7.         }
  8. }
  9.  
  10. var obj = AJX.Efx(1,0,0,0,0);
Siiipi, exactamente...ahora la pregunta... que hace arguments y callee? No los conocía...bueno de echo siendo más sincero, apenas estoy conociendo el lenguaje, pero espero hacerlo muy rápido.

Un saludo jeybi...