Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个<rich:popupPanel>我想在按下 Escape 键时关闭它。弹出面板有一个“onclick”事件,但没有与之关联的关键事件。我尝试使用 keyup 事件(jQuery),但在这种情况下似乎没有任何效果。请注意,我只能使用 Richfaces 3.3.x
<rich:popupPanel>
您可以使用 Richfaces<rich:hotKey/>组件来隐藏弹出面板:
<rich:hotKey/>
<rich:hotKey selector="#mypanel" key="escape" handler="#{rich:component('mypanel')}.hide()"/>