About 82,700 results
Open links in new tab
  1. onunload Event - W3Schools

    onunload occurs when the user navigates away from the page (by clicking on a link, submitting a form, closing the browser window, etc.). Note: The onunload event is also triggered when a …

  2. Window: unload event - Web APIs | MDN - MDN Web Docs

    May 2, 2025 · Use the event name in methods like addEventListener(), or set an event handler property. js addEventListener("unload", (event) => { }) onunload = (event) => { }

  3. html - Javascript onload and onunload - Stack Overflow

    Mar 28, 2012 · When you write window.onunload = goodBye(); you assign whatever handler that is returned from goodBye to the unload event. Since nothing is returned, there will be no event …

  4. HTML onunload Event Attribute - GeeksforGeeks

    Nov 15, 2023 · Fired when a user navigates away from a page or closes the browser. Useful for executing cleanup actions or displaying confirmation prompts. Allows to handle scenarios …

  5. javascript - Difference between onbeforeunload and onunload

    Aug 1, 2011 · onunload is responsible for executing an instruction when the page is closed. It also causes issue with IE and AJAX. onbeforeunload is more efficient because it does not run in …

  6. JavaScript + onunload event - Stack Overflow

    Aug 12, 2010 · This is simple, add a JavaScript boolean to the page and a function that set's this boolean to true. Make sure that every element in your page that posts back to your server …

  7. JavaScript HTML DOM Events - W3Schools

    The onload and onunload events are triggered when the user enters or leaves the page. The onload event can be used to check the visitor's browser type and browser version, and load …

  8. JavaScript onunload Event - Tpoint Tech

    Mar 18, 2025 · When a user goes away from a page while selecting, submitting, clicking, and leaving the browser window, the onunload event typically enters the onunload state. …

  9. JavaScript onunload Event: Window Unloaded - CodeLucky

    Feb 1, 2025 · The onunload event in JavaScript is triggered when a window or tab is about to be closed or refreshed. It’s a crucial event for performing cleanup tasks, saving data, or running …

  10. HTML | DOM onunload Event - GeeksforGeeks

    Jul 28, 2021 · The HTML DOM onload event in HTML occurs when an object has been loaded. The onload event is mostly used within the <body> tag, in order to run the script on the web …

  11. Some results have been removed
Refresh