Answers for "javascript check if dom loaded"

1

dom is loaded

document.addEventListener('DOMContentLoaded', (event) => {
    console.log('DOM fully loaded and parsed');
});
Posted by: Guest on June-25-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 check if dom loaded"

Code answers related to "Javascript"

Browse Popular Code Answers by Language