Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

how to prevent the backspace conditionally. if no focus in any control in the document ?

  • 2 trả lời
  • 2 gặp vấn đề này
  • 3 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

I prevent a backspace button conditionally using confirm box. i used event.preventdefault() method to stop the event of i press ok in the conform box. But it works when the focus is on either input or text area elements. if there is no focus in these controls the browser redirects to previous page.

i need your help.. thanks in advance !

I prevent a backspace button conditionally using confirm box. i used event.preventdefault() method to stop the event of i press ok in the conform box. But it works when the focus is on either input or text area elements. if there is no focus in these controls the browser redirects to previous page. i need your help.. thanks in advance !

Được chỉnh sửa bởi dineshkumar vào

Tất cả các câu trả lời (2)

more options

Hi dineshkumar, Thank you for your question. I understand that there are some default hot keys that are not being prevented in a web page unless they are focused in an input html tag. I do not know if this is for a website you developed or if this is for all websites, but:

If it is for all websites: you can use a key configuration to change it only in Firefox http://kb.mozillazine.org/Keyconfig_extension

If it is in a website:

Thank you and we hope this helps.

more options

Note that you can disable the backspace button action to go back or forward in the history in Firefox by setting the browser.backspace_action pref to 2 on the about:config page.