注册 登录
编程论坛 JavaScript论坛

一段JS代码的注释

luo007nan 发布于 2010-04-08 10:04, 575 次点击
fx.Layout = Class.create();         // 为 fx 增加 Layout 属性
fx.Layout.prototype = Object.extend(new fx.Base(), {    // 为Layout 增加
    initialize: function(el, options) {
        this.el = $(el);
        this.el.style.overflow = "hidden";
        this.iniWidth = this.el.offsetWidth;
        this.iniHeight = this.el.offsetHeight;
        this.setOptions(options);
    }
});
fx.Height = Class.create();
Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), {   
    increase: function() {
        this.el.style.height = this.now + "px";
    },

    toggle: function() {
        if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0);
        else this.custom(0, this.el.scrollHeight);
    }
});
----------------------------------
忘大家帮看看 写在注释
1 回复
#2
work0012010-04-09 16:20
怎么了,有什么问题吗
1