jQuery event when HTML5 Datalist option is clicked

前端 未结 3 1039
醉话见心
醉话见心 2020-12-15 18:50

What I have now:

So i have this HTML5 Datalist with a bunch of options in it, and I have 2 events firing. One when the user types out something that

3条回答
  •  感情败类
    2020-12-15 19:37

    You can also listen to the 'select' event on the input field.

    $('#name').bind('select', function() {
        // handle input value change
    });
    

提交回复
热议问题