关于this指代当前对象
window.onload=function(){
var aLi=document.getElementsByTagName('li');
for(var i=0; i<aLi.length; i++){
aLi[i].onmouseover=function(){
var aUl = this.getElementsByTagName("ul")[0];
if(aUl){
var This = aUl;
}
clearInterval(This.time);
This.time=setInterval(function(){
This.style.height=This.offsetHeight+16+"px";
if(This.offsetHeight>=120){
clearInterval(This.time);
}
},30)
}
第五行的this换成aLi[i]为什么运行不出,this指代的不是它吗?