2

In HTML we can say to a form to show browser autocomplete. But is it possible to detect if some of the autocomplete values was selected? enter image description here

rel1x
  • 2,351
  • 4
  • 34
  • 62

1 Answers1

0

The browser fires an autocompletechange event. You can do something like this:

$(document).ready(function () {
    $('EnterElementHere').on('autocompletechange change', function () {
      $('EnterElementHere').html('You selected: ' + this.value);
    }).change();
});

Read here

Vinod Bhavnani
  • 2,185
  • 1
  • 16
  • 19