Here is a method that works in all browsers. You need to specify the function within an anonymous function, and set the parameter to null.
Code Sample
var foo = "Hello World";setTimeout(function () { helloWorld(foo); foo = null }, 3000);function helloWorld(foo)
{alert(foo);
}
No comments:
Post a Comment