+ 3
Mofey check this. i hope this is what you looking for https://code.sololearn.com/Wj6RWKE87QTa/?ref=app
24th Nov 2020, 10:03 AM
Med Amine Fh
Med Amine Fh - avatar
+ 2
document.getElementsByClassName(".button");
23rd Nov 2020, 10:24 PM
George S Mulbah II
George S Mulbah II - avatar
+ 2
Mofey are you using a computer or the phone ? it seems sololearn code playground not showing me the results as expected
23rd Nov 2020, 10:28 PM
Med Amine Fh
Med Amine Fh - avatar
+ 2
$("article")
23rd Nov 2020, 11:05 PM
Gordon
Gordon - avatar
+ 2
$("article") not $article Where are the ( and "?
24th Nov 2020, 7:55 AM
Gordon
Gordon - avatar
+ 2
Mofey you can use “document.querySelector("article:nth-child(1)");” https://code.sololearn.com/WQWRf21pIzTW/?ref=app
24th Nov 2020, 10:24 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 1
you can select by className or tagName , this return an array of nodes: document.querySelectorAll(".myclass") document.querySelectorAll("button")
23rd Nov 2020, 9:51 PM
Med Amine Fh
Med Amine Fh - avatar
+ 1
sorry i didnt understand what you want to do , can you try to explain
23rd Nov 2020, 10:02 PM
Med Amine Fh
Med Amine Fh - avatar
+ 1
Mofey glad to help you.😉
24th Nov 2020, 11:46 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 1
hey guyss
25th Nov 2020, 12:23 PM
Sophie Harradine
Sophie Harradine - avatar
+ 1
Sophie Harradine please do not spam in Q/A Discussions.
25th Nov 2020, 1:00 PM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
0
You can access by ClassName or by TagName
26th Nov 2020, 2:24 PM
Arnaldo B. Basterretche
Arnaldo B. Basterretche - avatar