This page was last modified on Feb 28, 2023 by MDN contributors. The onload event can be used to check the visitor's browser type and browser version, and load the proper version of the web page based on the information. This is used with the window element to execute a script after the webpage has completely loaded. Home JavaScript DOM JavaScript onload. Visit Mozilla Corporations not-for-profit parent, the Mozilla Foundation.Portions of this content are 19982023 by individual mozilla.org contributors. Thanks for the tip about, yea well, it's the first result when googling about when to use. If this feature is set, the browser will omit the Referer header, as well as set noopener to true. "Office UI Fabric" is a "React"-based framework - that's why "React" is in the list as well. Follow these four easy steps and get a clear understanding of the window.onload method. In general you should do the second, but you should attach an event listener to it instead of defining the function. Step 1 Open Visual Studio 2012 and click on "File" -> "New" -> "Project.". mode_edit code. While using W3Schools, you agree to have read and accepted our,
, ,