title: Want to disable refresh event of browser
body: <p>I want to stop refresh the page in browser</p>
  
  <ul>
  <li>By using F5 key </li>
  <li>By using Rightclick mouse button </li>
  <li>By using Browser refresh button </li>
  </ul>
  
  <p>Above first I got it in javascript but I need to disable the browser refresh button. I got it answer of first option by code.</p>
  
  <pre><code>function disableF5Btn(e) {
      if ((e.which || e.keyCode) == 116)
          e.preventDefault();
  };
  
  $(document).bind("keydown", disableF5Btn);
  </code></pre>
  
  <p>But now i am not able to do the 2nd and 3rd option.</p>