Elements in DOM | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Elements in DOM

Iā€™m having problems with this question! Can anyone help? Fill in the blanks to change the background colour of all span elements of the page. var s = document. Get ElementsByTagName (ā€œ****ā€); ***(var x=0; x<s.length;x++) { s[*].style.backgroundColor = ā€œ#33EA73ā€; } The first part I donā€™t get ****, a four letter entry? Can anyone help?

13th Jan 2019, 10:59 AM
Brent Malcolm
5 Respostas
+ 1
thanks
13th Jan 2019, 11:06 AM
Brent Malcolm
+ 1
I think it should be "span" (you have to change background color of span elements), "for", "x".
13th Jan 2019, 11:08 AM
TheWhĀ”teCat šŸ‡§šŸ‡¬
TheWhĀ”teCat šŸ‡§šŸ‡¬ - avatar
0
The answer is "span". It will return an array with all the span elements in the page.
13th Jan 2019, 11:06 AM
giannismach
giannismach - avatar
0
Brent Malcolm You 're welcome!
13th Jan 2019, 11:07 AM
giannismach
giannismach - avatar
0
yes it is, i answered it correctly a couple of days ago, but the module came up as unanswered the next day, and being so busy, i didnt take notes!
13th Jan 2019, 11:09 AM
Brent Malcolm