Skip to content
Advertisement

Tag: classname

Try GetElementsByClassName [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question try js ref_doc_getelementsbyClassName “Uncaught TypeError: Cannot set property ‘value’ of null ” This

My JavaScript isn’t changing className property

Here is the main part of my code attempting to toggle class on a p tag (info) on click of my button (btn). I’m not sure what I’m doing wrong. I have never used the className property before so I’m not sure if I’m missing something simple, or if there is fundamental error in my logic trying to attempt this.

Advertisement