function test()
{
var obj = new Object();
obj.a = "test setTimeout";
setTimeout(test,5000);
// private
function test()
{
alert(obj.a+"/n private 可以传私有对象");
}
}
function test()
{
var obj = new Object();
obj.a = "test setTimeout";
//protect
//不能传对象
setTimeout(function(){test1(obj)},5000);
}
function test1(obj)
{
alert(obj.a+"/n protect 可以传对象");
}
function test()
{
var obj = new Object();
obj.a = "test setTimeout";
//public
//不能传对象
setTimeout(test1,5000);
}
function test1()
{
alert("public setTimeout 不能传私有对象");
}
{
var obj = new Object();
obj.a = "test setTimeout";
setTimeout(test,5000);
// private
function test()
{
alert(obj.a+"/n private 可以传私有对象");
}
}
function test()
{
var obj = new Object();
obj.a = "test setTimeout";
//protect
//不能传对象
setTimeout(function(){test1(obj)},5000);
}
function test1(obj)
{
alert(obj.a+"/n protect 可以传对象");
}
function test()
{
var obj = new Object();
obj.a = "test setTimeout";
//public
//不能传对象
setTimeout(test1,5000);
}
function test1()
{
alert("public setTimeout 不能传私有对象");
}