How to detect click (including browser’s back button) events using javascript?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can detect clicks inside the page with a simple
clickevent handler:It is impossible for web-page script detect clicks outside the page such as the back button and other browser chrome, for good security reasons. You would have to be part of a browser extension to do this.