本帖最后由 jone_linux 于 2009-07-21 12:27:46 编辑

解决方案 »

  1.   

    initialize: function(ResponseMegDivId)
        {
            this._ResponseMegDivId = ResponseMegDivId; // 1
            this._DefMeg = { 
                onCreate: function() {
                            alert(this._ResponseMegDivId); // 2
                }
            };
            this._AjaxDefMeg(this._DefMeg);
        },你这两行代码 1 , 2 中的 this 不是同一对象
      

  2.   

            this._DefMeg = { 
                onCreate: function(v){
                    return function() {
                        alert(v);
                    }
                }(this._ResponseMegDivId);
            };
      

  3.   

    initialize: function(ResponseMegDivId) 
        { 
            this._ResponseMegDivId = ResponseMegDivId; // 1 
            this._DefMeg = { 
                onCreate: function() { 
                            alert(ResponseMegDivId); // 2  直接显示参数
                } 
            }; 
            this._AjaxDefMeg(this._DefMeg); 
        }, 
      

  4.   

    LZ要用Prototype的Class,为何有不按其语法写呢