0

How can i add same class text in a whats app link

Please go through my code. I want to add Same class text in whats app link. https://code.sololearn.com/WVBhn1OxLCt5/?ref=app

7th Oct 2021, 3:40 PM
Salman B
Salman B - avatar
4 Answers
+ 4
sendWa = function(){ let elems = document.getElementsByClassName ("message"); for (let i = 0; i < elems.length; i++) console.log(elems[i].value); return 0; } // Keep learning & happy coding :D
8th Oct 2021, 5:37 AM
SoloProg
SoloProg - avatar
+ 1
getElementsByClassName() will return an array, not an element
7th Oct 2021, 3:58 PM
Apollo-Roboto
Apollo-Roboto - avatar
0
When i use Id instead of class it works. But it doesn't work when i use class.
7th Oct 2021, 3:41 PM
Salman B
Salman B - avatar
0
Do you understand what i am trying to do? I want to collect all textarea message at one place that is whats app link. How will it be possible?
7th Oct 2021, 3:59 PM
Salman B
Salman B - avatar