Answers for "on load function"

2

on load javascript

window.addEventListener('load', (event) => {
  console.log('page is fully loaded');
});
Posted by: Guest on April-08-2020
0

javascript execute code on page load

<html>
 
  <body onload="loaded();"></body>
  <script>
    function loaded() {
      alert('Page is loaded');
    }
 
  </script>
 
</html>
Posted by: Guest on November-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language