ITPub博客

首页 > 应用开发 > > $(...)[j].addClass is not a function(…)??

$(...)[j].addClass is not a function(…)??

作者:germo 时间:2019-11-05 16:12:54 0 删除 编辑

for (i in $('label')){

$('label')[i].onclick=function(e){

console.log($('label').length);

for(j in $('label')){

$('label')[j].addClass('selected');

}

$(this).removeClass('che');

}

}

哪里有错误呢??

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1868/viewspace-3135943/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-07-17

  • 博文量
    209
  • 访问量
    8226