Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/02/2011, 19:52
Avatar de AlejandroMtzRmz
AlejandroMtzRmz
 
Fecha de Ingreso: febrero-2011
Mensajes: 81
Antigüedad: 13 años, 2 meses
Puntos: 4
Respuesta: Definir variables al llamar a la funcion

Gracias!! eso me fue muy util, pero porque no puedo llamarla desde un boton?

Código HTML:
Ver original
  1. function fn(param){
  2. setTimeout(function(){alert(param.author +": "+ param.msg);}, param.time);
  3. }
  4.  
  5. <button onclick="fn({msg:"hola", author:"mr who", time:500});">boton</button>