Selecting HTML Tags (JS)

document.getElementById (id): Returns the first record matching the id attribute.document.getElementsByName (name): Returns all records matching the name attribute.document.getElementsByTagName: Returns all records that match the tag name as an array.document.getElementsByClassName (className): Returns all records that match the class attribute.document.querySelector: selects the first record that matches the selector.document.querySelectorAll (selector): Return all records matching the selector to the... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started