for(var i = 0; i < clear_main.length; i++){
clear_main[i].className = clear_main[i].className.replace(' main-i-active','');
clear_ctrl[i].className = clear_ctrl[i].className.replace(' ctrl-i-active','');
}
这块代码在浏览器中老是会提示有问题
for (i=0 ;i<clear_ctrl.length;i++){
clear_main[i].className = clear_main[i].className.replace(' main-i_active','');
clear_ctrl[i].className = clear_ctrl[i].className.replace(' ctrl-i_active','');
}
不知道是不是这个问题,(' main-i_active','')和(' ctrl-i_active',''),i和active之间是下划线而不是横杆