this.className = "on"; odivs[this.index].className = "show"; 这两句是什么意思呢?求大神指点
<script type="text/javascript">
// JS实现选项卡切换
window.onload = function(){
var otab = document.getElementById("tabs");
var oui = otab.getElementsByTagName("ul")[0];
var olis = oui.getElementsByTagName("li");
var odivs = otab.getElementsByTagName("div");
for(var i= 0;i<olis.length;i++){
olis[i].index = i;
olis[i].onclick = function() {
for(var n= 0;n<olis.length;n++){
olis[n].className = "show";
odivs[n].className = "hide";
}
this.className = "on";
odivs[this.index].className = "show";
}
};
}
</script>