jQuery beforeunload custom pop up window for leaving a page

后端 未结 3 1105
滥情空心
滥情空心 2020-12-03 06:53

Hi I would like to customize my pop up for leaving a page, is there any simple way to do that?

I am using simple jQuery

$(document).ready(function()          


        
3条回答
  •  眼角桃花
    2020-12-03 07:06

    This question have been asked and answered in several stackoverflow posts such as this one

    If you can also elaborate on what the circumstances of leaving the "page", you could probably get a better and proper answer. If you want to warn that user should save before then checkout the top post of the link. If you just want to warn before you leave the page, try this answer that user Hunter left:

    
    

提交回复
热议问题