imgDbClick: function(){
clearTimeout(clickTimeId);
var tb = this.getElementsByClassName('thumbnail')[0];
var imginfo=imgManger.getImgInfo(tb,4)//这是成功代码 特别感谢qq37744644 原来用的是this.getImgInfo 报错 但是在对象内别的方法调用正常 除了单双击事件里(就封装了这2个事件函数)
imgedit(imginfo);
},
init: function(){
var self = this;
var imgObjs = document.getElementsByClassName(cn);
for (var i = 0; i < imgObjs.length; i++) {
imgObjs[i].ondblclick = self.imgDbClick;
imgObjs[i].onclick = self.imgClick;
imgObjs[i].onmouseenter = self.imgHover;
imgObjs[i].onmouseleave = self.imgOut;
};
},
setImgObj: function(imginfo){
var tb=this.getImgObj(imginfo[0]);
if(!tb){alert('Object not find!');return false;}
var imgobj=tb.childNodes[1];
var caption = tb.getElementsByClassName('caption')[0];
imgobj.src=imginfo[2];
caption.childNodes[1].innerText=imginfo[3];
caption.childNodes[3].innerText=imginfo[1];
caption.childNodes[5].innerText=imginfo[4];
return true;
},