为什么arr[i].style.width=300+"px";中浏览器会Uncaught TypeError: Cannot read property 'style' of undefined
var arr=document.getElementsByTagName("li");
for(var i=0;i<arr.length;i++){
arr[i].onclick=function(){
setInterval(function(){
arr[i].style.width=300+"px";
},300);
}
}