摘要: [html]演示地址:http://7hihi.com/millet/1.0.5/m.html[/html][javascript]/* * Millet JavaScript Library v1.0.5 * http://7hihi.com * * Copyright 2010, textbox * Dual licensed under the MIT or GPL Version 2 li... 阅读全文
posted @ 2010-08-23 21:03 7hihi 阅读(157) 评论(0) 推荐(0) 编辑
摘要: [javascript]function a(){ this.firstAttr = 'i an the original this.first'; this.firstMethod = function(){ //this is the first original firstMethod() };}a.prototype = { constructor:a... 阅读全文
posted @ 2010-08-23 15:55 7hihi 阅读(130) 评论(0) 推荐(0) 编辑
摘要: [javascript]YUI.add("yui-throttle", function(Y) { /* Based on work by Simon Willison: http://gist.github.com/292562 */ var throttle = function(fn, ms) { ms = (ms) ? ms : (Y.config.throttl... 阅读全文
posted @ 2010-08-23 15:52 7hihi 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 我们用firebug调试js程序时,dir出来的函数体会出现几种颜色1:black 代表函数变量[包括var定义的字符串变量,this. 定义的变量内部变量,等等非函数变量],2:green 代表函数[prototype中的函数,静态函数,所有函数]3:red prototype 被修改时出现,一般情况下就这前种色对我们调试比较有用,但时不时的你会看到红色,其实本不会出现红色,但一个函数的prot... 阅读全文
posted @ 2010-08-23 15:49 7hihi 阅读(99) 评论(0) 推荐(0) 编辑
摘要: YUI 中有两个 Env[enviroment]1:Y.Env 这里的Env通过 _attach 对象记录有那些个模块被挂载了.通过_used对象记录那些个模块被使用过了.2:Y.constructor.Env 通过mods对象存放那些通过prototype.add添加的模块.里面同样也有一个 _attach 对象和一个_used对象,只不过它是执行prototype.add添加模块时有模块被添加... 阅读全文
posted @ 2010-08-23 15:47 7hihi 阅读(142) 评论(0) 推荐(0) 编辑