Any event triggered on autocomplete?

前端 未结 8 1996
余生分开走
余生分开走 2020-11-27 15:39

I have a pretty simple form. When the user types in an input field, I want to update what they\'ve typed somewhere else on the page. This all works fine. I\'ve bound the

8条回答
  •  孤街浪徒
    2020-11-27 16:12

    Here is an awesome solution.

    $('html').bind('input', function() {
        alert('test');
    });
    

    I tested with Chrome and Firefox and it will also work for other browsers.

    I have tried a lot of events with many elements but only this is triggered when you select from autocomplete.

    Hope it will save some one's time.

提交回复
热议问题