SHARE

Yo ninjas, so in this javascript lesson I want to build on the last tutorial by introducing the getAttribute and setAttribute methods for changing the attributes on your HTML elements.

getAttribute allows us to read the value of any given attribute, and setAttribute allows us to set the attribute value to whatever we want.

If you have any questions, fire away 🙂

DOM OBJECT METHODS AND PROPERTIES – http://www.w3schools.com/jsref/dom_obj_all.asp

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9i9Ae2D9Ee1RvylH38dKuET

========== CSS for Beginners Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gQeDH6xYhmO-db2mhoTSrT

========== HTML for Beginners Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9ibZ2TSBaGGNrgh4ZgYE6Cc

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

10 COMMENTS

  1. Hi, Shaun first of all I want to thank you for your hard work. Second thanks for clearing my mind when you called .innerHTML and .textContent METHODS, i got a little confuse trying to set my mind. I love how HAPPY you start each tutorial video. GO GO NINJA. Thanks a lot.

  2. Have you thought about doing these tutorials in Brackets so it will be a
    more real and easy to follow along demonstration?? – or do you get into
    that later?

  3. Hi! Love ur vids!!
    Is it just me or do properties and methods seem to work a little bit on the opposite side with the DOM? coz when you use innerHTML to change the tags and content, it's like u r using a method/or function, but using getAttribute, is like trying to show the property "attribute" ( even tho that's not the case) if that makes any sense.

LEAVE A REPLY

Please enter your comment!
Please enter your name here