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
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
+ 1
getElementsByClassName() will return an array, not an element
0
When i use Id instead of class it works. But it doesn't work when i use class.
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?