为什么一定要var This=this?
如题,为什么不能直接使用this?http://www.imooc.com/code/1736
<!DOCTYPE html>
<html>
<head>
<meta charset="GB2312">
<title></title>
<style type="text/css">
ul{list-style-type: none;}
li{width: 160px;height: 50px;font-size: 16px;font-family: "微软雅黑";font-weight: bolder;background-color: coral;text-align: center;line-height: 50px;cursor: pointer;float: left;border-top-left-radius: 2em;border-top-right-radius: 2em;}
li:hover{background-color: #2E8B57;color: whitesmoke;height: 60px;line-height: 60px;margin-top: -10px;}
.frist{background-color: #2E8B57;color: whitesmoke;border: 2px solid deepskyblue;height: 60px;line-height: 60px;margin-top: -10px;}
.bka{border:2px solid darkred;}
</style>
<script type="text/javascript">
window.onload=function(){
var a=document.getElementsByTagName("ul")[0];
for(var i=3;i<a.childNodes.length-1;i++){
a.childNodes[i].className="bka";
i=i+1;
}
var li=document.getElementsByTagName("li");
for(var n=3;n<a.childNodes.length-1;n++){
a.childNodes[n].onmouseover=function(){
var This=this;
This.time=setInterval(function(){
This.style.border="2px solid deepskyblue";
This.style.width=This.offsetWidth+8+"px";
if(This.offsetWidth>=120){
clearInterval(This.time)
}
},30)
}
a.childNodes[n].onmouseout=function(){
this.style.border="2px solid darkred";
}
n=n+1;
}
}
</script>
</head>
<body>
<ul id="woqu">
<li class="frist"><a href="#"></a>HTML</li>
<li><a href="#"></a>CSS</li>
<li><a href="#"></a>MICROSOFT</li>
<li><a href="#"></a>SURFACEBOOK</li>
<li><a href="#"></a>WINDOWS10</li>
<li><a href="#"></a>ASD</li>
</ul>
</body>
</html>