What is the difference between .className(") and .classList.add(")?
Hello, dear experts! In the process of learning JS appeared a question:
.getElementById('id').className = 'class'
.getElementById('id').classList.add('class');
what are their differences (mean .className and .classList) ?
Thanks for the replies!
1 answer
Find more questions by tags JavaScript