I was given the html code (picture 1) and the javascript code (picture 2). Code
ID: 3605414 • Letter: I
Question
I was given the html code (picture 1) and the javascript code (picture 2). Code needs to be in javascript.
Assign textNode with the first p element, and assign listNodes with all elements with a class name of top-language. HTML JavaScript 1 kp>Top 10 TIOBE index for June 2017 : 2 Kol class-"languages-list"> 3 Kli class-"top-ten-1anguage">Java li li 11 di class-"top-ten-language"X class-"top-ten-1anguage">C+*/li> class-top-ten-language-python class-"top-ten-language"X# 6 class-"top-ten-language"-visual Basic .NET 1 PHPK/li> 8 10 11 li class-"top-ten-1anguage" >Perk/li> 12 | li class-"top-ten-language" >Assembly Language 13Explanation / Answer
file.js:
var textNodes;
var listNodes;
textNodes = document.getElementsByTagName("p");
listNodes = document.getElementByClassName('top-ten-language').value;
Hence, this is the code for the above description.
Rate an upvote...Thankyou
Hope this helps...
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.