Javascript to detect whether the dropdown of a select element is visible

后端 未结 7 1053
甜味超标
甜味超标 2020-12-19 08:39

I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried:

  • Watching for click events, where
7条回答
  •  长情又很酷
    2020-12-19 08:59

    My first question is - why are you trying to do this? I can't think of any application that exhibits this behavior and I can't think of a good reason for this situation to happen.

    I'm not saying you don't have a good reason, but I just don't know what that might be :).

提交回复
热议问题