+ 1
How can I make a new div and span at Same time onclick?
I want to make WhatsApp clone so, when user send message the message display in new div Like this:- https://code.sololearn.com/WQtik6Ry8usl/?ref=app But in simple way
3 Answers
+ 5
I see you are aware of createElement() and appendChild() as you have used them in that code. So what's the problem with creating new <div> and <span>?
Also why reposting this? you already get a response in previous post
https://www.sololearn.com/Discuss/3183867/?ref=app
+ 3
Create a button. Attach a function to the button. Whenever the button is clicked, create a new element and append it to the body or whatever you use as a container for the new elements.
As Ipang mentioned, do not re-post the same question.
If you need help with your code, please link your *own* code.
0
That was not response