I am trying to make a tab section whenever we click on a tab, a content appears below, I have used the code in this CodePen sandbox, but I get an error:
Uncaught TypeError: Cannot read properties of undefined (reading 'style')
I don't understand what is wrong with the logic or why isn't Стиль свойства недоступен, и почему я получаю эту ошибку всякий раз, когда я нажимаю на вкладку. < /p>
var btns = document.querySelectorAll(".tablinks");
console.log(btns);
var content = document.querySelectorAll(".tabcontent");
console.log(content);
for(var i=0; i
Подробнее здесь: https://stackoverflow.com/questions/749 ... -undefined