<script>
var Oul = document.getElementById (' Abouttab-ul ');
var oLi = oul.getelementsbytagname (' li ');
var odiv = document.getElementById (' abouttab-content ');
var ocontent = Odiv.queryselectorall ('. tab-content ');
for (var i = 0; i < oli.length; i++) {
Oli[i].index = i;
Oli[i].onclick = function () {
for (var i = 0; i < oli.length; i++) {
Oli[i].classname = ";
Ocontent[i].classname = ' tab-content ';
}
This.classname = ' cur ';
Ocontent[this.index].classname + = "active";
}
}
</script>
The second type of notation
var Oul = document.getElementById (' Foodtab-ul ');
var oLi = oul.getelementsbytagname (' li ');
var odiv = document.getElementById (' foodtab-content ');
var ocontent = Odiv.queryselectorall ('. tab-content ');
for (var i = 0; len = oli.length, i < Len; i++) {
Oli[i].index = i;
Oli[i].onclick = (function (i) {
return function () {
for (var i = 0; i < oli.length; i++) {
Oli[i].classname = ";
Ocontent[i].classname = ' tab-content ';
}
This.classname = ' cur ';
Ocontent[this.index].classname + = "active";
};
}) (i);
};
TAB Toggle Notation