Sometime we need to find when the page is loaded or page is completely loaded before specific java script function is called. As we all know if try to access DOM element using document.getElementBtId() before page is loaded or page is completely loaded we get error. So to prevent the error we can user following java script to detect page is loaded?
Fig (1) – Detect Page is loaded !!
Happy Programming !!!