Answers for "js when page has loaded"

1

js on page loaded

window.onload = function() {
  yourFunction(param1, param2);
};
Posted by: Guest on April-02-2021
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 "js when page has loaded"

Code answers related to "Javascript"

Browse Popular Code Answers by Language