我有这样的目的:
function ImageHolder(Attributes, Parent)
{
this.Id = Attributes[ Id ];
this.Parent = Parent;
this.Element = $( <div/> );
this.msg = "hello world";
this.Parent.append(this.Element);
this.handleDrop = function(e, ui)
{
alert(this.msg);
};
this.Element.droppable({drop: this.handleDrop});
}
于是,我就提出这样一个目标:
holder = new ImageHolder(A,B);
但是,当我试图把一些东西推向要素时,我发现这一错误:
this.msg is undefined
我在这里做了一些错误的事情?