下面的FocusNews是一个类,attachEventShowImages是使用attachEventShowImages 时绑定的一个方法
showImages是类的一个方法,现在问题是在attachEventShowImages 中如何才能调用到showImages 这个方法
下面注释行是不能调用的:FocusNews.prototype.attachEventShowImages = function(focusIMG,index)
{
return function()
{
//this.showImages(focusIMG,index);
}
}FocusNews.prototype.showImages = function(focusIMG,index)
{
focusIMG.src=this.data[index].img;
}