JavaScript Show Popup on Page Refrexer des modifications non sauvées
var onReloadCheck = function () {
$(window).on('beforeunload', function () {
var modal = $('#myModal').hasClass('show');
if (modal) {
return "If you leave before saving, your changes will be lost.";
}
});
}
Badie96