Question:medium

Explain the purpose of the onload event handler in JavaScript.

Show Hint

For faster script execution, consider using the DOMContentLoaded event instead of onload. DOMContentLoaded runs as soon as the HTML DOM is parsed, without waiting for large images and stylesheets to finish loading.
Updated On: Jun 29, 2026
Show Solution

Solution and Explanation

Was this answer helpful?
0