Skip to content
Advertisement

Tag: dom

execution script for several ID – loop?

I’m downloading ID from localStorage.getItem(1,22,3,14….). I want every single ID to be executed in jQuery (if it exists on the website). I can execute the code for one ID, but I don’t know what to do to make each ID after the decimal point executed. I try so but it doesn’t pass. I have to loop it, right? can anyone

How do I use localStorage to remember a user’s name

This code has been checked for errors and none were detected. But, when it runs, it alerts null. For Sololearners my code bit: https://code.sololearn.com/WOv1cF0EewdB/?ref=app Why is this?* *jQuery answers are OK Answer You are not getting a hello alert is because you are checking getItem’s return value with === true and !== true. setItem will convert your value to string,

Javascript DOM capturing after using javascript to insert dom

I have a question regarding DOM manipulation, say I insert a grid using this function: afterwards, I try to grab all the vertexes with the class “vertex” using document.querySelectorAll(“vertex”) it doesnt work: console log of this returns: but this works: console.log of this actually returns all 9 divs I see that the difference is that grid__container is pre-defined in my

How I can show a innerHTML inside another one?

Question: In this code I´m traying to show the local storage in DOM, how I can show the “li” of the second for inside of the “ul” in the first for? to show it like this? : This is the code I wrote, if you see in the case both innerHTML obviouly will be separate and I dont want that.

ReferenceError: document is not defined (JavaScript in VS Code)

Im learning JS. Found a good video “JavaScript Programming – Full Course” and stucked at the 2nd part where I need to use DOM. I have the HTML document, in i refered to the JS file. Other stuff working well, but this: let messageEL = document.getElementById(“message-el”) Always get this error: ReferenceError: document is not defined I installed live server, and

Advertisement