I should prevent page refresh using pressing F5 or Ctrl+F5. I prepare following code to reach this aim, but when I press any key in the page the function is running and can't fill any textbox or press any other keys in the page. How can I solve this problem?
$(" * ").bind('keydown', 'F5', function (e) {
e.preventDefault();
abp.message.confirm("Are You Sure To Refresh This Page?",
function (isConfirm) {
if (isConfirm) {
window.location = "NewForm?id=" + $("#Id").val();
}
});
});