<div class="form-group label-floating is-empty mt-3 mb-1"> <label class="control-label">Имя</label> <input class="form-control" name="name" type="text" autocomplete="off"> </div> 

How on JQuery to monitor the object with the identifier name of the name attribute. And in the case of data changes in the input field, perform some action, for example console.info('Данные у объекта изменены');

Important: The action needs to be performed only when the user has finished entering data and left the input form.

    1 answer 1

     $('input[name="name"]').on('focusout', function () { console.log(this.value); }); 
     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div class="form-group label-floating is-empty mt-3 mb-1"> <label class="control-label">Имя</label> <input class="form-control" name="name" type="text" autocomplete="off"> </div> 

    • Just now noticed, the answer does not fulfill part of the task from the question. It does not take into account whether the data was changed in the form. He just performs the action when he loses focus - Denis Heavenly