摘要: setTimeout有两种形式 setTimeout(code,interval) setTimeout(func,interval,args) 其中code是一个由JS语句构成的字符串,其中的语句依赖的上下文是window. func是一个函数. function outer(){ setTimeout((function(self){ return function(){alert(self.a)} }(this)),1000); } 阅读全文
posted @ 2012-02-01 12:50 wuhao12 阅读(205) 评论(0) 推荐(0)
摘要: 常用属性:length:实参个数callee:被调函数本身callee.caller/fnName.caller:调用者callee/fnName.length:形参个数 阅读全文
posted @ 2012-01-31 12:39 wuhao12 阅读(141) 评论(0) 推荐(0)