Answers for "javascript run code when page loaded"

1

js on page loaded

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language