how to have a page reload button in alert in js code example
Example: javascript alert on refresh
window.onbeforeunload = function() {
return "Data will be lost if you leave the page, are you sure?";
};
window.onbeforeunload = function() {
return "Data will be lost if you leave the page, are you sure?";
};