The problem is that after performing the check, it is issued that the login is busy, but when you start to delete characters from the field, the message "login is busy" does not disappear. How to implement it?

Closed due to the fact that it was off-topic by MihailPw , Artem , Air , Vadizar , 0xdb participants on Apr 8 '18 at 20:41 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - MihailPw, Artem, Air, Vadizar, 0xdb
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Hang onkeydown on the input field and then when tracking, delete the "login is busy" - sair

1 answer 1

If I understood correctly, then somehow:

aForm = $('form'); $('#text').val('qwerty'); aForm.on('input', function (e) { var target = $(e.target); target.next().text(''); target.removeClass('error'); }); 
 #text { width: 200px; border: 1px solid black; outline: none; padding: 2px 5px; } #text.error { border-color: red; } #errorField { color: red; } 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <form action="#"> <input id="text" class="error" type="text" autofocus> <div id="errorField">Исправьте код</div> </form>