var Obj = function(msg){
this.msg = msg;
this.shout = function(){
alert(this.msg);
}
this.waitAndShout = function(){
var that = this;
setTimeout(that.shout, 5000);
//隔五秒钟后执行上面的shout方法
}
return this;
}
Obj("shouting").waitAndShout();
因为要连起来。