Tuesday, 6 September 2016

Disable f5 and browser refresh using javascript | Inside Window or Iframe

Disable f5 and browser refresh using javascript | Inside Window or Iframe

Javascript code:

function disableF5(e) { if ((e.which || e.keyCode) == 116) e.preventDefault(); };
$(document).on("keydown", disableF5);