Can all attribute of an html tag be accessed as a property in javascript?? 🤔🤔 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can all attribute of an html tag be accessed as a property in javascript?? 🤔🤔

3rd Sep 2019, 4:57 PM
Lucky Osareniye
Lucky Osareniye - avatar
3 Answers
+ 8
Yes... all of it javascript can do everything you know
9th Sep 2019, 3:59 PM
MCGAmedCoder gamerArtist
MCGAmedCoder gamerArtist - avatar
+ 1
Yes, here is an example: let node = document.querySelector("a"); let href = node.getAttribute("href");
3rd Sep 2019, 6:00 PM
Schindlabua
Schindlabua - avatar
0
Thanks
5th Sep 2019, 8:05 AM
Lucky Osareniye
Lucky Osareniye - avatar