Answer the question
In order to leave comments, you need to log in
What is the difference between .className('') and .classList.add('')?
Hello dear experts! In the process of learning JS, a question appeared:
.getElementById('id').className = 'class'
.getElementById('id').classList.add('class');
what are their differences (I mean .className and .classList) ?
Thanks for answers!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question