Answer the question
In order to leave comments, you need to log in
How to catch button click on input?
Is it possible to somehow catch the mouse button click on the input and turn on the function? @click is obviously not suitable for these purposes (
Answer the question
In order to leave comments, you need to log in
In React, for example, there is onChange where you can pass an arrow function and describe an event of this kind there as event.target.value
If we are talking about the mouse button, then try this:
<input type="text" onmousedown="alert('Кликнуто поле!');" placeholder="Кликни меня">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question