js實現用戶關閉頁面時提示是否離開此頁面的方法

<script type="text/javascript"> window.onbeforeunload = function(){ return "您確定要退出頁面嗎?"; } </script> 效果圖
相關文章
相關標籤/搜索