Hello,
This is probably a beginner question, but I couldn't find it the answer. I'm trying to use the function getElementById. Usually this is done on a document, ie: document.getElementById(id). This doesn't work for me it says: "getElementById is not defined.
I googled it, and one of the reasons I found was that I'm using node.js. I installed node.js so I could run my code in visual code studios and see if there's any problems.
Apparently, node.js does not access the document object. And I'm not entirely sure what that means. It advises me to use a work around. I could use queryselector perhaps, but that also works on document.
How can I get getElementbyId working, or perhaps someone has an alternative I'm not aware of?
Thank you.