Answer the question
In order to leave comments, you need to log in
How to track the event of adding text to input?
I create a form, it is necessary that when entering text in the input, the function works, it is when entering, when deleting the text, no actions should occur. How can this be implemented? Thank you in advance.
Answer the question
In order to leave comments, you need to log in
like this, in principle, to increase the number of characters
var start_length = $( ".target" ).val().length;
$( ".target" ).keyup(function() {
if($( ".target" ).val().length > start_lenght) {
start_length = $( ".target" ).val().length;
alert('добавлен текст');
}
});
no action should be taken when deleting text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question