How to catch the autocomplete form?

Good time of day! Such a problem, the form immediately after load filled, and I need that if any of the filling is passed over the input label appears. How to catch the auto-complete form to be found there? here is the code https://codepen.io/alyce52/pen/mzOOwp
5bbe991cdc5fe626427444.png
March 12th 20 at 08:11
3 answers
March 12th 20 at 08:13
tried onchange, if you click in empty space returns the value with the auto fill, I tried to simulate the event something does not work still
March 12th 20 at 08:15
March 12th 20 at 08:17
Maybe just after the page loads to look at value. If filled - show the inscription.
so it is not obtained until some event will not happen shows a blank value although the input screen is filled with autocomplete, and if such occurs, the change event is then immediately console.log shows the value filled in by AutoFill. - alyce52 commented on March 12th 20 at 08:20
@alyce52, it is possible to generate event. For example, focus():
focusMethod = function getFocus() { 
document.getElementById("myTextField").focus();
}

Insert into $( document ).ready() (if using jQuery) and in the onfocus to compare value. - Jerrod_Mohr commented on March 12th 20 at 08:23

Find more questions by tags jQueryJavaScript