SyntaxFix
Write A Post
Hire A Developer
Questions
This works for me:
window.addEventListener("beforeunload", function(event) {_x000D_ event.returnValue = "You may have unsaved Data";_x000D_ });