为什么changeOption(index)要加上个形式参数index
function changeOption(index){
for (var j = 0; j < titles.length; j++) {
titles[j].className = '';
divs[j].style.display = 'none';
}
lis[index].className = 'select';
divs[index].style.display = 'block';
}
function changeOption(index){
for (var j = 0; j < titles.length; j++) {
titles[j].className = '';
divs[j].style.display = 'none';
}
lis[index].className = 'select';
divs[index].style.display = 'block';
}
2017-06-16
举报