Answer the question
In order to leave comments, you need to log in
How to add text from button to input?
Hello!
There is such an input - <input type="text" name="tag" value=" Your tag">
How to make it like on a gif?
That is, there are buttons with genres under the input and when you click on these buttons, they will be added to the input where the tags are.
(the tags themselves are not needed, you need to add the text to the input itself)
I will be very grateful for the ready-made solution, thanks in advance;)
Answer the question
In order to leave comments, you need to log in
<button onclick="document.getElementsByName('tag')[0].value += 'Text';">Add 'Text'</button>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question