This can be used with the body element to execute a script after the webpage has completely loaded. Specifies the height of the content area, including scrollbars. These bogus href values cause unexpected behavior when copying/dragging links, opening links in a new tab/window, bookmarking, or when JavaScript is loading, errors, or is disabled. In general, however, I'd avoid assigning functions directly to onload in favour of using addEventListener (with compatibility libraries if I needed to support older browsers). If an empty string ("") is specified or this parameter is omitted, a blank page is opened into the targeted browsing context. How to clear form after submit in Javascript without using reset? Visual Studio Code. At first sight, the DOMContentLoaded event is very simple. Example. Heres a document with