How can I prevent Backspace from navigating back in javascript?

后端 未结 4 1317
天涯浪人
天涯浪人 2021-02-02 17:00

This works in IE, but I cannot get it to work in Opera or Firefox. I want to prevent Backspace from navigating away if and only if the current focus is the SELECT dropdown.

4条回答
  •  太阳男子
    2021-02-02 17:25

    You might want to check out the source code for the project from this article. He goes into detail about how he had to contend with the backspace key in different browsers.

提交回复
热议问题