1、a:foo.att 2、
(1)、
myValue = function()
{
name = null;
};
myValue.prototype=
{
setData :function(username)
{
this.name=username;
}
}
(2)、
function test()
{
//do something
}
test();3、直接将函数做为参数传递来实现函数回调,如:
function test(p,callback) //callback参数为回调函数
{
alert(p);
callback();
}
function __Callback()
{
alert("call back!");
} test("hello",__Callback);
(1)、
myValue = function()
{
name = null;
};
myValue.prototype=
{
setData :function(username)
{
this.name=username;
}
}
(2)、
function test()
{
//do something
}
test();3、直接将函数做为参数传递来实现函数回调,如:
function test(p,callback) //callback参数为回调函数
{
alert(p);
callback();
}
function __Callback()
{
alert("call back!");
} test("hello",__Callback);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货