Javascript Selectors - Javascript Tutorial for Beginners With Examples

Publicado em: 21 Abril 2015
no canal de: LearnCode.academy
270,052
2k

In this Javascript tutorial for beginners, we're going to be using Javascript selectors to access the DOM (document object model) and interact with our webpage in realtime. Selectors allow us to search for elements in the web page, get those html elements, and do things with them.

Selector methods are:
document.getElementsByTagName('div')
document.getElementsByClassName('done')
document.getElementById('my-id')
document.querySelector('#my-id')
document.querySelectorAll('.classname')

Once you have selected an html element, you can modify it:
document.getElementById('my-id').innerHTML = "new html"
document.getElementById('my-id').className = "newclass otherclass"

Hopefully you liked this javascript tutorial for beginners with examples (hopefully you like every web development tutorial I crank out)
As you can see, selectors are powerful in Javascript and even if you're a javascript beginner, you can make any and every change to your web page.

~-~~-~~~-~~-~
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
   • Responsive Design Tutorial - Tips for...  
~-~~-~~~-~~-~


Nesta página do site você pode assistir ao vídeo on-line Javascript Selectors - Javascript Tutorial for Beginners With Examples duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário LearnCode.academy 21 Abril 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 270,052 vezes e gostou 2 mil espectadores. Boa visualização!