這段代碼哪里有問題?
window.onload?=?function(){ ????????????var?Lis?=?document.getElementsByTagName("li"); ????????????if(var?i=0?;?i<Lis.length?;?i++){ ????????????????Lis[i].i?=?i; ????????????????Lis[i].onmouseover?=?function(){ ????????????????????this.className?=?"lihover"; ????????????????} ????????????????Lis[i].onmouseout?=?function(){ ????????????????????this.className?=?""; ????????????????} ????????????} ????????}
2016-07-22
if改成for,“Lis[i].i?=?i;”這句是什么作用,也去掉