function fun(x){alert(x);}
var i=1;
var t=setTimeout(function(){ fun(i) },10000);
i=2;
so when the fun(x) really runs,what will be alerted.
if the result is 2,how to make x be 1.
for some reason,i cannot use a global variable.
thx
update
in fact,i need to use such thing in a for(){} thing;
so maybe the best way is like this:
setTimeout("testDisplay(" + aa + "," + bb + ")",1000);
You can use an extra scope. That works in every browser.