3
Hi, I’m developing a list with all my facebook friends.
I managed to create the first line of the code, which makes me take all my friends and store them in a variable within an array, as shown below:
var info = document.getElementsByClassName("_52jh _5pxc");
Then when I ask to see the elements the following message is shown:
info[0];
<h3 class="_52jh _5pxc"><a href="/urldouser?ref=bookmarks">Nome Do Usuário</a></h3>
What I need to do, is take the "Username" and I’m not getting it, I tried to use the
var names = info[0].getAtributte("a");
But it returns to me null, how could I solve this, to the point of being able to catch what is after the opening. >"Nome Do Usuário"<
.
I believe it is a simple answer, however, I am starting the web phase now and I have some difficulties, I thank you already.
Thank you very much!
– Igor Alisson