Answers for "javascript detect when loaded dom"

17

dom loaded event

window.addEventListener('DOMContentLoaded', (event) => {
    console.log('DOM fully loaded and parsed');
});
Posted by: Guest on March-21-2020
1

how to check if page is loaded in javascript

<body onload="onload()">
	<div>
  		<p>TEXT</p>
  	</div>  
</body>

<script>
  function onload(){
	console.log("Window Has Been Loaded!")
}
</script>
Posted by: Guest on April-13-2021

Code answers related to "javascript detect when loaded dom"

Code answers related to "Javascript"

Browse Popular Code Answers by Language