title: Handling Android back button in mobile site without using Phonegap
body: <p>I need to intercept Android back button event using simple Javascript(if it is possible), </p>
  
  <p>I am having a mobile site where I want to alert the user and close the entire site on click of the back button at any part of my site, I do not need to navigate back of my history</p>
  
  <p>Note: I don't want to include Phonegap support in my site.</p>
  
  <p>Any ideas will be great!</p>
  
  <p><strong>Edit :</strong>
  I also used </p>
  
  <pre><code>window.onbeforeunload = function() {
    return "Do you want to exit?";
  };
  </code></pre>
  
  <p>This also does not help my situation, because it will be called on unload of the url, I am navigating page to page using div's using #ID  (<code>using Jquery Mobile &lt;div data-role="page"&gt;&lt;/div&gt;</code>)</p>
  
  <p>So I strictly want to get an event on click of the Android Back button</p>