I need to append an element onclick just after another (a textarea).
How do I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update: This question may not answer the question properly but it was selected as the right answer. So I am adding the correct answer here since most people don’t scroll past it and the original author hasn’t accessed Stackoverflow for many years now.
Correct answer from @RobG
Old Irrelevant answer:
You can use the appendChild method to add a new elementHTML
Javascript
Resulting HTML