同步完整源码 - 2026-05-24

This commit is contained in:
xiaoxue
2026-05-24 23:05:48 +08:00
commit 21ef9025a7
425 changed files with 109915 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
<div>beforeunload demo.</div>
<script>
window.addEventListener('beforeunload', event => {
// Chromium & WebKit way.
event.returnValue = 'Leave?';
// Firefox way.
event.preventDefault();
});
</script>