摘要: dojo 对Javascript1.6 的数组操作功能进行了拓展: Method Summary clearCache() every(arr, callback, thisObject) Determines whether or not every item in arr satisfies the condition implemented by callback. filter(arr, callback, thisObject) Returns a new Array with those items from arr that match the condition impleme 阅读全文
posted @ 2013-11-02 23:57 Luan Louis 阅读(61) 评论(0) 推荐(0)
摘要: 1. dojo 的模块化 dojo 的模块化是指,dojo将每个冗杂的js代码有组织的分割开,划分为模块,需要该模块时,将其引入,即可使用,这个类似于在java代码里的 import 语句; 比如我们需要dojo.a.b 模块,只需要执行下面的语句:require("dojo.a.b"); // 实际上这个是相当于加载dojo/a/b.js 文件2、dojo.hitch() 此方法为指定的函数绑定上下文,并执行。function printAge(){ console.log(age);}var girl = { age:20}var woman = { ag... 阅读全文
posted @ 2013-11-02 23:19 Luan Louis 阅读(359) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-02 21:52 Luan Louis 阅读(101) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-02 16:40 Luan Louis 阅读(58) 评论(0) 推荐(0)
摘要: AttributeUsageexplainationexamplearguments[function.]arguments[[0|1|2|...|n]]当前正在运行的函数的参数func.arguments[0],对参数0 的引用arguments.callee[function.]arguments.callee当前在正在执行的函数引用,可用于函数的递归。该属性仅当相关函数正在执行时才可用。function factorial(n){ if (n ");var y = new MyObj;if (y.constructor == MyObj) document.write(&quo 阅读全文
posted @ 2013-11-02 15:37 Luan Louis 阅读(265) 评论(0) 推荐(0)