Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/05/2012, 16:09
jrcuelloalcaraz
 
Fecha de Ingreso: mayo-2012
Mensajes: 1
Antigüedad: 11 años, 11 meses
Puntos: 0
Respuesta: settimeout sobre función que llama a función no funciona

Prueba con esto, te va a funcionar:

<html>
<head>
<script type="text/javascript">
function timeMsg(msg)
{
var t=setTimeout("alertMsg('"+msg+"')",500);
}
function alertMsg(msg)
{
alert(msg);
}
</script>
</head>

<body>
<form>
<input type="button" value="Display alert box in 0.5 seconds" onclick="timeMsg('hello');">
</form>
</body>
</html>