:master: Non so, prova questo se può andare :master:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pagina senza titolo</title>
<script language="javascript" type="text/javascript">
// <!CDATA[
function lancia_metodo_timeout(stringa_funzione, times, interval, n)
{
if(n == undefined) n = 1;
if(n > times) return;
eval(stringa_funzione);
n++;
window.setTimeout(function(){lancia_metodo_timeout(stringa_funzione, times, interval, n);}, interval);
}
function Button1_onclick()
{
self.adesso = (new Date()).getTime();
var stringa_funzione = "v = new Date();document.getElementById('div1').innerHTML += '
' + n + ': ' + (v.getTime() - self.adesso)" ;
lancia_metodo_timeout(stringa_funzione, 3, 3000);
}
// ]]>
</script>
</head>
<body>
<input id="Button1" type="button" value="lancia setTimeout" onclick="return Button1_onclick()" />
<hr />
<div id="div1"></div>
</body>
</html>