Browse Source

增加离开页面提示

shileiye 8 years ago
parent
commit
7e7a23a4c5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      index.php

+ 3 - 0
index.php

@@ -241,6 +241,9 @@ $title = "MD记事本";
         }
       }
     }
+    window.onbeforeunload = function () {
+      return "请确认文档是否保存!";
+    }
 	</script>
   </body>
 </html>