Tagged: document


window vs document

Web browser is made up of hierarchy of objects. At the root level we have a window object. Window It is the root level element in any web page. All the global variables are...


window.onload vs document.onload

window.onload It is fired when the entire page loads, including its content (images, css, scripts, etc.) $(window).load() document.onload It is fired when the DOM is ready which can be prior to images and other...