Web Design

Named Element IDs Can Be Referenced as JavaScript Globals

September 27, 2022
Named Element IDs Can Be Referenced as JavaScript Globals

Did you know that DOM elements with IDs are accessible in JavaScript as global variables? It’s one of those things that’s been around, like, forever but I’m really digging into it for the first time.

If this is the first …


Named Element IDs Can Be Referenced as JavaScript Globals originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Read More

Our latest news

Read the latest news, articles and tips from Add On IDX

Want to learn more?

Signup