Create your blog and photo album with postbit
Create your blog and photo album

Create new post

Content:

Upload a picture:
Tags (keywords separated by comma)

Save Cancel
The JavaScript Blog js:   Followers: 3 ; Following: 3

Explore The JavaScript Blog's photo albums:
Photos from posts (7)
Javascript tools (2)

Selecting DOM elements with querySelectorAll


Click button to see demo:

This code will select all "span" elements of the page and change it's background color css:



No jQuery required!!! The query is made using "querySelectorAll" JavaScript's native function.

Post by The JavaScript Blog (2012-10-09 13:29)

Post your comment:

Name: Email: Site:




| Explore users | New posts | Create your blog | Create your photo album |
| About Postbit | Our blog | Terms of use | Contact Postbit |


Copyright © 2017 - postbit.com