Answers for "javascript show popup on page refresh unsaved changes"

0

javascript show popup on page refresh unsaved changes

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.";
            }
        });
    }
Posted by: Guest on June-28-2021

Code answers related to "javascript show popup on page refresh unsaved changes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language