Which Event is fired? (javascript, input-field-history)

后端 未结 3 2019
攒了一身酷
攒了一身酷 2021-01-19 17:29

I have a text field which is empty, but when you click in it it has some suggestions from previous inputs.

Which JavaScript event is fired if i choose one of them wi

3条回答
  •  盖世英雄少女心
    2021-01-19 18:22

    An incredibly useful tool that should help you solve your problem is Visual Event 2. Basically, for any element on your screen, it will tell you which Javascript evenets that element is registered for.

    It's a bookmarklet, so what you do is drag this the to your bookmarks bar, navigate to the page you're curious about, and then click then link. Presto! Detailed information about the currently registered Javascript events.

    As @smerny said, there's a good chance that's not even Javascript, and is just native browser functionality. That being said, you could probably implement your own version pretty easily.

提交回复
热议问题