[removed] executed on page refresh instead of on page close

前端 未结 4 1673
刺人心
刺人心 2020-12-19 01:41

I\'m using window.onbeforeunload to pop up a confirm dialog when a close event occurs, but the confirm dialog appears on page refresh and doesn\'t execute on pa

4条回答
  •  北海茫月
    2020-12-19 01:56

    Since you anyway only want to display your text, What just using the onbeforeunload as it is expected just return the string?

    
    

提交回复
热议问题